]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/vote.qc
Display more panels (engineinfo, modicons and timer) while showing the scoreboard
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / vote.qc
index d7d4d252bec67441f178311e5f593bde24220536..e78cd2806d07d16c8cd0cc35f333ea3f96d43a90 100644 (file)
@@ -61,10 +61,10 @@ void HUD_Vote()
        else
                vote_alpha = bound(0, 1 - (time - vote_change) * 2, 1);
 
-       if(!vote_alpha)
+       a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1);
+       if(a <= 0)
                return;
-
-       HUD_Panel_UpdateCvars();
+       HUD_Panel_UpdateCvars(a);
 
        if(uid2name_dialog)
        {
@@ -72,18 +72,15 @@ void HUD_Vote()
                panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
        }
 
-    // these must be below above block
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
 
-       a = vote_alpha * (vote_highlighted ? autocvar_hud_panel_vote_alreadyvoted_alpha : 1);
        if (autocvar_hud_panel_vote_dynamichud)
                HUD_Scale_Enable();
        else
                HUD_Scale_Disable();
-       HUD_Panel_DrawBg(a);
-       a = panel_fg_alpha * a;
+       HUD_Panel_DrawBg();
 
        if(panel_bg_padding)
        {
@@ -119,10 +116,10 @@ void HUD_Vote()
        drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, a, DRAWFLAG_NORMAL);
 
        // print the yes/no counts
-    s = sprintf(_("Yes (%s): %d"), getcommandkey("vyes", "vyes"), vote_yescount);
-       drawstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, '0 1 0', a, DRAWFLAG_NORMAL);
-    s = sprintf(_("No (%s): %d"), getcommandkey("vno", "vno"), vote_nocount);
-       drawstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, '1 0 0', a, DRAWFLAG_NORMAL);
+       s = sprintf("^2%s ^7(%d)", getcommandkey_forcename(_("Yes"), "vyes"), vote_yescount);
+       drawcolorcodedstring_aspect(pos + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, a, DRAWFLAG_NORMAL);
+       s = sprintf("^1%s ^7(%d)", getcommandkey_forcename(_("No"), "vno"), vote_nocount);
+       drawcolorcodedstring_aspect(pos + eX * 0.5 * mySize.x + eY * (4/8) * mySize.y, s, eX * 0.5 * mySize.x + eY * (1.5/8) * mySize.y, a, DRAWFLAG_NORMAL);
 
        // draw the progress bar backgrounds
        drawpic_skin(pos + eY * (5/8) * mySize.y, "voteprogress_back", eX * mySize.x + eY * (3/8) * mySize.y, '1 1 1', a, DRAWFLAG_NORMAL);