]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
DrawNumIcon vertical layout: draw numbers with different number of digits with the...
authorterencehill <piuntn@gmail.com>
Thu, 25 Nov 2010 21:43:29 +0000 (22:43 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 25 Nov 2010 21:43:29 +0000 (22:43 +0100)
qcsrc/client/hud.qc

index e96b82ff2a5e5fc48cc0b5256d0c41ea717c6d81..8ef0efe586eabb39892f453eedcb27b23fd5b92d 100644 (file)
@@ -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;
        }