float is_spec;\r
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);\r
\r
- if((rgb == '1 1 1') && (!is_spec)) {\r
- rgb_x = cvar("sbar_color_bg_r") + 0.5;\r
- rgb_y = cvar("sbar_color_bg_g") + 0.5;\r
- rgb_z = cvar("sbar_color_bg_b") + 0.5; }\r
- \r
+ if((rgb == '1 1 1') && (!is_spec))\r
+ rgb = stov(cvar_string("sbar_color_bg")) + '0.5 0.5 0.5';\r
+\r
// Layout:\r
tmp_x = sbwidth;\r
tmp_y = sbar_fontsize_y * 1.25;\r
float is_spec;\r
is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);\r
vector hl_rgb;\r
- hl_rgb_x = cvar("sbar_color_bg_r") + 0.5;\r
- hl_rgb_y = cvar("sbar_color_bg_g") + 0.5;\r
- hl_rgb_z = cvar("sbar_color_bg_b") + 0.5;\r
+ hl_rgb = stov(cvar_string("sbar_color_bg")) + '0.5 0.5 0.5';\r
\r
pos_y += sbar_fontsize_y;\r
drawstring(pos, strcat("Rankings"), sbar_fontsize, '1 1 1', sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
else\r
{\r
- rgb_x = cvar("sbar_color_bg_r");\r
- rgb_y = cvar("sbar_color_bg_g");\r
- rgb_z = cvar("sbar_color_bg_b");\r
+ rgb = stov(cvar_string("sbar_color_bg"));\r
\r
for(tm = teams.sort_next; tm; tm = tm.sort_next)\r
{\r
drawpic(bottom - '96 96 0', "gfx/hud/bg_status", '192 96 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
else {\r
// allow for custom HUD colors in non-teamgames\r
- color_x = cvar("sbar_color_bg_r");\r
- color_y = cvar("sbar_color_bg_g");\r
- color_z = cvar("sbar_color_bg_b");\r
+ color = stov(cvar_string("sbar_color_bg"));\r
\r
drawpic(bottom - '96 96 0', "gfx/hud/bg_status", '192 96 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
}\r
if (teamplay)\r
drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color\r
else {\r
- color_x = cvar("sbar_color_bg_r");\r
- color_y = cvar("sbar_color_bg_g");\r
- color_z = cvar("sbar_color_bg_b");\r
+ color = stov(cvar_string("sbar_color_bg"));\r
\r
drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
}\r
\r
if (teamplay)\r
color = GetTeamRGB(myteam) * sbar_color_bg_team;\r
- else {\r
- color_x = cvar("sbar_color_bg_r");\r
- color_y = cvar("sbar_color_bg_g");\r
- color_z = cvar("sbar_color_bg_b");\r
- }\r
+ else\r
+ color = stov(cvar_string("sbar_color_bg"));\r
\r
vector voteorigin = bottomright - '290 135 0';\r
vector votesize = '280 70 0';\r
drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color\r
else {\r
// allow for custom HUD colors in non-teamgames\r
- color_x = cvar("sbar_color_bg_r");\r
- color_y = cvar("sbar_color_bg_g");\r
- color_z = cvar("sbar_color_bg_b");\r
+ color = stov(cvar_string("sbar_color_bg"));\r
\r
drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach", '256 256 0', color, sbar_alpha_bg, DRAWFLAG_NORMAL);\r
}\r
setDependent(e, "viewsize", 0, 100);\r
me.TR(me);\r
me.TDempty(me, 0.2);\r
- me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Default ^1red^7:"));\r
- me.TD(me, 1, 3, e = makeVoretSlider(0, 1, 0.01, "sbar_color_bg_r"));\r
- setDependent(e, "viewsize", 0, 100);\r
- me.TR(me);\r
- me.TDempty(me, 0.2);\r
- me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Default ^2green^7:"));\r
- me.TD(me, 1, 3, e = makeVoretSlider(0, 1, 0.01, "sbar_color_bg_g"));\r
- setDependent(e, "viewsize", 0, 100);\r
+ me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Default color:"));\r
+ me.TD(me, 2, 2, e = makeVoretColorpickerString("sbar_color_bg", "sbar_color_bg"));\r
me.TR(me);\r
- me.TDempty(me, 0.2);\r
- me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Default ^4blue^7:"));\r
- me.TD(me, 1, 3, e = makeVoretSlider(0, 1, 0.01, "sbar_color_bg_b"));\r
- setDependent(e, "viewsize", 0, 100);\r
me.TR(me);\r
me.TDempty(me, 0.2);\r
me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Team color:"));\r