From: MirceaKitsune Date: Sun, 5 Sep 2010 10:30:14 +0000 (+0300) Subject: And if we're at cvar-ing, why not cvar the colors too? X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a0e7c8d23c3b7516b3cb6a02a6bf8cbcec7bd9a8;p=voretournament%2Fvoretournament.git And if we're at cvar-ing, why not cvar the colors too? --- diff --git a/data/defaultVoretournament.cfg b/data/defaultVoretournament.cfg index d65e6ca0..e7d7d2d9 100644 --- a/data/defaultVoretournament.cfg +++ b/data/defaultVoretournament.cfg @@ -1126,6 +1126,8 @@ seta sbar_scoreboard_highlight_alpha_self 0.25 "self highlight alpha value" seta sbar_stomachboard_status_brightness 0.5 "brightness of the stomach board status" seta sbar_stomachboard_status_alpha 0.75 "alpha of the stomach board status" seta sbar_stomachboard_status_fade 0.0125 "color fading speed of the stomach board status" +seta sbar_stomachboard_status_color1 "0 1 0" "RGB color of the stomach board status for self" +seta sbar_stomachboard_status_color2 "1 0 0" "RGB color of the stomach board status for predator" seta sbar_stomachboard_highlight_brightness 0.5 "brightness of the stomach board highlight" seta sbar_stomachboard_highlight_alpha 0.25 "alpha of the stomach board highlight" seta sbar_timer_increment 0 "1 = show elapsed time on the timer" diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index feba5f95..98130939 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -2947,12 +2947,12 @@ void Sbar_Draw (void) if(getstati(STAT_STOMACH_EATEN)) { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('1 0 0' * cvar("sbar_stomachboard_status_brightness")), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans(stov(cvar_string("sbar_stomachboard_status_color2")) * cvar("sbar_stomachboard_status_brightness")), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); drawstring(bottomleft - '-80 172 0', "predator:", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } else { - drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans('0 1 0' * cvar("sbar_stomachboard_status_brightness")), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); + drawpic(bottomleft - '0 256 0', "gfx/hud/bg_stomach_status", '256 256 0', Stomachstatus_Colortrans(stov(cvar_string("sbar_stomachboard_status_color1")) * cvar("sbar_stomachboard_status_brightness")), cvar("sbar_stomachboard_status_alpha"), DRAWFLAG_NORMAL); drawstring(bottomleft - '-80 172 0', "self:", '10 10 0', ' 1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL); } }