• What is best to make HUDs?
    6 replies, posted
I know about all the libraries of types of ways you make a HUD. But what's the best for making good looking huds regardless of how long it takes? [editline]14th April 2017[/editline] Or is it a variety of different types to make it look good?
[URL="http://wiki.garrysmod.com/page/Category:surface"]surface[/URL] and [URL="http://wiki.garrysmod.com/page/Category:draw"]draw[/URL] in a [URL="http://wiki.garrysmod.com/page/GM/HUDPaint"]HUDPaint[/URL] [URL="http://wiki.garrysmod.com/page/hook/Add"]hook[/URL].
Just to add on that, the draw library internally uses the surface library, as seen all over the [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/modules/draw.lua"]GitHub page[/URL]. Really, the most basic you can get for drawing is the surface library, which is what I always use since I consider it the fastest method.
Some people would disagree, but I personally quite enjoy making my huds inside a derma panel. I haven't entirely done a whole lot of work in terms of huds but making them inside a derma panel is easy because all you need to do is set your dimensions of elements accordingly to the x,y and width,height of the panel. I like this, because if you're giving players the option to change the position of their huds' position all you're required to do is move the panel, rather than figure out all the new coordinates for everything you've drawn.
Not in GMod, for one.
Everything must involve [I]cam.PushModelMatrix(m)[/I] in one way or another
[QUOTE=Minteh Fresh;52107386]Derma[/QUOTE] [URL="https://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/skins/default.lua"]Which also uses the surface library a little bit internally.[/URL] A lot of libraries use the surface library, it's just a choice on how easy you want it to be for yourself (although the surface library isn't hard on its own). Derma can work but you have to make sure not to recreate the same panel every frame.
Sorry, you need to Log In to post a reply to this thread.