From: terencehill Date: Thu, 25 Nov 2010 21:43:29 +0000 (+0100) Subject: DrawNumIcon vertical layout: draw numbers with different number of digits with the... X-Git-Tag: xonotic-v0.5.0~389 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ac44d19ca64cade3142179d2ea80be617fae3a0;p=xonotic%2Fxonotic-data.pk3dir.git DrawNumIcon vertical layout: draw numbers with different number of digits with the same y size --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e96b82ff2..8ef0efe58 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2036,8 +2036,10 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, float vertic drawpic_aspect_skin(picpos, icon, square, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL); drawfont = hud_bigfont; // make number smaller than icon, it looks better - numpos += square * (1 - 0.75) * 0.5; - drawstring_aspect(numpos, ftos(x), square * 0.75, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL); + // reduce only y to draw numbers with different number of digits with the same y size + numpos_y += square_y * ((1 - 0.7) / 2); + square_y *= 0.7; + drawstring_aspect(numpos, ftos(x), square, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL); drawfont = hud_font; return; }