Change Colors in CSQC Menus or HUD
Moderator: InsideQC Admins
2 posts
• Page 1 of 1
Change Colors in CSQC Menus or HUD
Hey guys i try to coloring my custom HUD for my mod so i Play a bit with Color Settings.
Okey now to the tut i will tell you guys ist very simple todo:
at first open the: "main.qc" and add in: "CSQC_Init"
one more in this file go to: "CSQC_ConsoleCommand" and write under
this code:
now open the: "gui_defs.qc" and put somewhere:
thats all we have to do...
here an note how to add the Color and Alpha:
Sample:

Okey now to the tut i will tell you guys ist very simple todo:
at first open the: "main.qc" and add in: "CSQC_Init"
- Code: Select all
registercommand ("hud_color");
registercommand ("hud_alpha");
hud_rgb = '1 1 1';
hud_a = 0.6;
one more in this file go to: "CSQC_ConsoleCommand" and write under
- Code: Select all
strCmd = argv (0);
this code:
- Code: Select all
if (argv(0) == "hud_color") { // Change Image Color best for GRAY!!!
hud_r = argv(1), hud_g = argv(2), hud_b = argv(3);
hud_rgb = stov (sprintf ("%g %g %g", stof (hud_r), stof (hud_g), stof (hud_b)));
}
if (argv(0) == "hud_alpha") { // Change Alpha Chan...
hud_a = stof (argv(1));
}
now open the: "gui_defs.qc" and put somewhere:
- Code: Select all
float hud_a; // Alpha
string hud_r, hud_g, hud_b;
vector hud_rgb;
thats all we have to do...
here an note how to add the Color and Alpha:
- Code: Select all
drawpic (pos, "gfx/csqc/sbar", size, hud_rgb, hud_a, 0);
Sample:

I am sorry for my English...
-

Rikku2000 - Posts: 49
- Joined: Wed Oct 20, 2010 6:33 pm
- Location: Germany
Re: Change Colors in CSQC Menus or HUD
Thanks for sharing this mini-tut, Rikku2000! You seem a very talented guy! I hope to see more of your work!
Meadow Fun!! - my first commercial game, made with FTEQW game engine
- toneddu2000
- Posts: 1352
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest