]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
The caller of DrawNumIcon should set drawfont
authorterencehill <piuntn@gmail.com>
Fri, 26 Nov 2010 18:59:49 +0000 (19:59 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 26 Nov 2010 18:59:49 +0000 (19:59 +0100)
qcsrc/client/hud.qc

index 8883e39537e757c2af6a9668a42b58f59188ac6e..cfe83a2d6a564a7ff22ebb8c904f592bfef21653 100644 (file)
@@ -2042,13 +2042,11 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, float vertic
 
                newSize_y /= 2;
                drawpic_aspect_skin(picpos, icon, newSize, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_bigfont;
                // make number smaller than icon, it looks better
                // reduce only y to draw numbers with different number of digits with the same y size
                numpos_y += newSize_y * ((1 - 0.7) / 2);
                newSize_y *= 0.7;
                drawstring_aspect(numpos, ftos(x), newSize, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
-               drawfont = hud_font;
                return;
        }
 
@@ -2080,9 +2078,7 @@ void DrawNumIcon(vector myPos, vector mySize, float x, string icon, float vertic
                picpos = newPos;
        }
 
-       drawfont = hud_bigfont;
        drawstring_aspect(numpos, ftos(x), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
-       drawfont = hud_font;
        drawpic_aspect_skin(picpos, icon, '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
 }