From: Mario Date: Fri, 27 Mar 2015 05:26:14 +0000 (+1100) Subject: Use an inversed color for buff progress bars (still doesn't look great, but slightly... X-Git-Tag: xonotic-v0.8.1~18^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e22b4ae13f028122ab1ecab0192c23ffbae16655;p=xonotic%2Fxonotic-data.pk3dir.git Use an inversed color for buff progress bars (still doesn't look great, but slightly more visible) --- 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);