X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fvote.qc;h=d974bee4bd3dca9fbf8b8307a0354d86b3fd211d;hb=905ec2fbd2b610eeb2591cdddbf71ce24b7bb3ab;hp=6017e8efa3d973de38e86e2513fdb8b10e4ca224;hpb=93c43c35ea720312bad9787488027c32996d48f5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/vote.qc b/qcsrc/client/hud/panel/vote.qc index 6017e8efa..d974bee4b 100644 --- a/qcsrc/client/hud/panel/vote.qc +++ b/qcsrc/client/hud/panel/vote.qc @@ -2,7 +2,8 @@ #include -/** Vote window (#9) */ +// Vote (#9) + void HUD_Vote() { if(autocvar_cl_allow_uid2name == -1 && (gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE || (serverflags & SERVERFLAG_PLAYERSTATS))) @@ -32,6 +33,12 @@ void HUD_Vote() if(!autocvar__hud_configure) { if(!autocvar_hud_panel_vote) return; + /* + if(cvar("hud_panel_vote_test")) { + if(vote_called_vote) strunzone(vote_called_vote); vote_called_vote = strzone("^1test the vote panel"); + vote_active = true; vote_yescount = 3; vote_nocount = 2; vote_needed = 4; + } else vote_active = false; + */ } else { @@ -47,13 +54,6 @@ void HUD_Vote() vote_prev = vote_active; } - /* - if(cvar("hud_panel_vote_test")) { - if(vote_called_vote) strunzone(vote_called_vote); vote_called_vote = strzone("^1test the vote panel"); - vote_active = true; vote_yescount = 3; vote_nocount = 2; vote_needed = 4; - } else vote_active = false; - */ - if(vote_active || autocvar__hud_configure) vote_alpha = bound(0, (time - vote_change) * 2, 1); else @@ -62,14 +62,14 @@ void HUD_Vote() a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1); if(a <= 0) return; - //HUD_Panel_UpdateCvars(a); + //panel_fade_alpha *= a; // nothing can hide this panel, not even the menu float hud_fade_alpha_save = hud_fade_alpha; if(uid2name_dialog && autocvar__menu_alpha) hud_fade_alpha = 0; else hud_fade_alpha = a; - HUD_Panel_UpdateCvars(1); + HUD_Panel_LoadCvars(); hud_fade_alpha = hud_fade_alpha_save; if(uid2name_dialog) @@ -116,7 +116,7 @@ void HUD_Vote() if(uid2name_dialog) s = _("Allow servers to store and display your name?"); drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL); - s = textShortenToWidth(vote_called_vote, mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors); + s = textShortenToWidth(ColorTranslateRGB(vote_called_vote), mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors); if(autocvar__hud_configure) s = _("^1Configure the HUD"); drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);