From: MirceaKitsune Date: Mon, 18 Jul 2011 15:49:46 +0000 (+0300) Subject: Draw text bigger when showing only the capacity X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0a266ae3ac4175481e6888cb9fa9ce0aebae6da0;p=voretournament%2Fvoretournament.git Draw text bigger when showing only the capacity --- diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index fd3c1bbf..5f15dfee 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -3033,13 +3033,21 @@ void Sbar_Draw (void) vector status_pos; string status_text; + float status_size; if(stomach_load) + { status_text = strcat(ftos(stomach_load), "^8/^7", ftos(stomach_maxload), "%"); + status_pos = bottomleft - '-44 168 0'; + status_size = 16; + } else + { status_text = strcat(ftos(stomach_maxload), "%"); - status_pos = bottomleft - '-44 168 0'; - status_pos -= '1 0 0' * stringwidth(status_text, TRUE, '16 16 0') * 0.5; - drawcolorcodedstring(status_pos, status_text, '16 16 0', sbar_alpha_fg, DRAWFLAG_NORMAL); + status_pos = bottomleft - '-44 170 0'; + status_size = 20; + } + status_pos -= '1 0 0' * stringwidth(status_text, TRUE, '1 0 0' * status_size) * 0.5; + drawcolorcodedstring(status_pos, status_text, '1 1 0' * status_size, sbar_alpha_fg, DRAWFLAG_NORMAL); if(getstati(STAT_VORE_DIGESTING)) // we are currently digesting drawpic(bottomleft - '-35 149 0', "gfx/hud/sb_digestion", '16 16 0', '0 1 0', sbar_alpha_fg, DRAWFLAG_NORMAL);