[nexuiz-commits] r8457 - trunk/data/qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Dec 26 14:36:41 EST 2009
Author: div0
Date: 2009-12-26 14:36:40 -0500 (Sat, 26 Dec 2009)
New Revision: 8457
Modified:
trunk/data/qcsrc/client/miscfunctions.qc
Log:
drawstring_expanding :P
Modified: trunk/data/qcsrc/client/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/client/miscfunctions.qc 2009-12-26 13:28:24 UTC (rev 8456)
+++ trunk/data/qcsrc/client/miscfunctions.qc 2009-12-26 19:36:40 UTC (rev 8457)
@@ -389,13 +389,20 @@
drawpic(position, pic, scale, rgb, alpha * fadelerp, flag);
}
+vector drawfontscale;
void drawstring_expanding(vector position, string text, vector scale, vector rgb, float alpha, float flag, float fadelerp)
{
float sz;
sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
+ if(cvar("menu_font_size_snapping_fix"))
+ drawfontscale = sz * '1 1 0';
+ else
+ drawfontscale = '1 1 0';
dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
- drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE)), text, scale * sz, rgb, alpha * (1 - fadelerp), flag);
+ drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE) / drawfontscale_x), text, scale * (sz / drawfontscale_x), rgb, alpha * (1 - fadelerp), flag);
+ if(cvar("menu_font_size_snapping_fix"))
+ drawfontscale = '1 1 0';
}
void drawcolorcodedstring_expanding(vector position, string text, vector scale, float alpha, float flag, float fadelerp)
@@ -405,4 +412,4 @@
dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE)), text, scale * sz, alpha * (1 - fadelerp), flag);
-}
\ No newline at end of file
+}
More information about the nexuiz-commits
mailing list