[nexuiz-commits] r8581 - in trunk/data/qcsrc: client server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 27 08:28:24 EST 2010
Author: div0
Date: 2010-01-27 08:28:23 -0500 (Wed, 27 Jan 2010)
New Revision: 8581
Modified:
trunk/data/qcsrc/client/miscfunctions.qc
trunk/data/qcsrc/server/t_items.qc
Log:
Fix expanding text; change one tokenize call because I can
Modified: trunk/data/qcsrc/client/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/client/miscfunctions.qc 2010-01-27 11:49:22 UTC (rev 8580)
+++ trunk/data/qcsrc/client/miscfunctions.qc 2010-01-27 13:28:23 UTC (rev 8581)
@@ -449,7 +449,11 @@
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, '1 0 0') / drawfontscale_x), text, scale * sz, rgb, alpha * (1 - fadelerp), flag);
+ drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), rgb, alpha * (1 - fadelerp), flag);
+ // width parameter:
+ // (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
+ // SIZE1
+
if(cvar("menu_font_size_snapping_fix"))
drawfontscale = '1 1 0';
}
@@ -459,6 +463,13 @@
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);
- drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, '1 0 0')), text, scale * sz, alpha * (1 - fadelerp), flag);
+ drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), alpha * (1 - fadelerp), flag);
+
+ if(cvar("menu_font_size_snapping_fix"))
+ drawfontscale = '1 1 0';
}
Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc 2010-01-27 11:49:22 UTC (rev 8580)
+++ trunk/data/qcsrc/server/t_items.qc 2010-01-27 13:28:23 UTC (rev 8581)
@@ -1458,7 +1458,7 @@
self.netname = strzone(self.netname);
//print(self.netname, "\n");
- n = tokenize(self.netname);
+ n = tokenize_console(self.netname);
for(i = 0; i < n; ++i)
{
for(j = WEP_FIRST; j <= WEP_LAST; ++j)
More information about the nexuiz-commits
mailing list