Draw or Surface?

I am trying to create a custom hud.

On the Wiki i found these classes:
Draw and Surface

So my question is, what class should i use for creating my hud and what is the best way of creating it?

I use surface unless I need rounded corners.

The best way of creating it, is to code it.

You use draw if it is an undefined parent object that you are painting, you use surface if it is contained inside the .Paint function of a vgui object.

I think that is how it is supposed to be used, anyway xD

draw.* functions are just wrappers for the surface library.

You can use either library of function, it doesn’t really matter in the long run. The draw functions are there when you want a convenience function so you don’t have to either write it yourself or paste a paragraph of code that does it every time you need to do that.


Okay, thanks a lot! :slight_smile: