From e22b4ae13f028122ab1ecab0192c23ffbae16655 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 27 Mar 2015 16:26:14 +1100 Subject: [PATCH] Use an inversed color for buff progress bars (still doesn't look great, but slightly more visible) --- qcsrc/client/hud.qc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index d39f08eda..85f197711 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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); -- 2.39.2