]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use an inversed color for buff progress bars (still doesn't look great, but slightly...
authorMario <zacjardine@y7mail.com>
Fri, 27 Mar 2015 05:26:14 +0000 (16:26 +1100)
committerMario <zacjardine@y7mail.com>
Fri, 27 Mar 2015 05:26:14 +0000 (16:26 +1100)
qcsrc/client/hud.qc

index d39f08edac679349597305115524af8c04b17765..85f197711832b17ac3938320f00fba23964cf8b7 100644 (file)
@@ -4522,8 +4522,7 @@ void HUD_Buffs(void)
        }
 
        HUD_Panel_UpdateCvars();
-
-       draw_beginBoldFont();
+       
 
        vector pos, mySize;
        pos = panel_pos;
@@ -4541,17 +4540,7 @@ void HUD_Buffs(void)
        //float buff_iconalign = autocvar_hud_panel_buffs_iconalign;
        vector buff_offset = '0 0 0';
 
-       /*float strength = ceil(strength_time);
-               if(autocvar_hud_panel_powerups_progressbar)
-                       HUD_Panel_DrawProgressBar(pos + strength_offset, mySize, autocvar_hud_panel_powerups_progressbar_strength, strength/maxstrength, is_vertical, strength_baralign, autocvar_hud_progressbar_strength_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
-               if(autocvar_hud_panel_powerups_text)
-               {
-                       if(strength > 1)
-                               DrawNumIcon(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1);
-                       if(strength <= 5)
-                               DrawNumIcon_expanding(pos + strength_offset, mySize, strength, "strength", is_vertical, strength_iconalign, '1 1 1', 1, bound(0, (strength - strength_time) / 0.5, 1));
-               }*/
-
+       draw_beginBoldFont();
        float buff_time, buff_maxtime;
        buff_time = bound(0, getstatf(STAT_BUFF_TIME) - time, 99);
        buff_maxtime = 60; // TODO: stat?
@@ -4559,7 +4548,7 @@ void HUD_Buffs(void)
        {
                if(buff_time && autocvar_hud_panel_buffs_progressbar)
                        HUD_Panel_DrawProgressBar(pos + buff_offset, mySize, autocvar_hud_panel_buffs_progressbar_name, buff_time/buff_maxtime, 0, 0, 
-                                                                         Buff_Color(e.items) * 0.5, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
+                                                                         Buff_Color(e.items) * -1 + '1 1 1', (autocvar_hud_progressbar_alpha * panel_fg_alpha) * 0.4, DRAWFLAG_NORMAL);
 
                //DrawNumIcon(pos + buff_offset, mySize, shield, "shield", is_vertical, buff_iconalign, '1 1 1', 1);
                drawcolorcodedstring_aspect(pos + buff_offset, s, mySize, panel_fg_alpha * 0.5, DRAWFLAG_NORMAL);