Editable Hud

I have a working HUD and a Derma menu to go along with it which would act as an editor that can change colors, position, etc.

How can I link the two files so they can share variables so when I set a color in the Derma menu, the HUD file will be able to use that new color? Does that make sense?

Could this have anything to do with **[G.include

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=G.include)** ??

File 1: config.lua

[lua]HUD_BGCOLOR = Color(255,0,0)
HUD_FGCOLOR = Color(0,0,255)[/lua]

File 2: hud.lua

draw.RoundedBox( 0, 0, 0, ScrW(), 25, HUD_BGCOLOR )
draw.RoundedBOx( 0, 2, 2, ScrW() - 4, 21, HUD_FGCOLOR )

That would use the variables background and foreground color to draw a box at the top of the screen.

So yes, you are supposed to use “include”.

Thats friggin’ amazing. Thank you very much.

Adds Entoros to credits