vector fs;
if(theSize_x <= 0 || theSize_y <= 0)
error("Drawing zero size text?\n");
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- fs = draw_fontscale;
- draw_fontscale = '1 1 0';
- }
if(ICanHasKallerz)
drawcolorcodedstring(boxToGlobal(theOrigin, draw_shift, draw_scale), theText, globalToBoxSize(boxToGlobalSize(theSize, draw_scale), draw_fontscale), theAlpha * draw_alpha, 0);
else
drawstring(boxToGlobal(theOrigin, draw_shift, draw_scale), theText, globalToBoxSize(boxToGlobalSize(theSize, draw_scale), draw_fontscale), theColor, theAlpha * draw_alpha, 0);
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- draw_fontscale = fs;
- }
}
void draw_CenterText(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz)
{
vector v;
v = '0 0 0';
//float r;
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- fs = draw_fontscale;
- draw_fontscale = '1 1 0';
- }
v_x = stringwidth(theText, ICanHasKallerz, boxToGlobalSize(SizeThxBye, draw_scale)) / draw_fontscale_x;
- if not(cvar("menu_font_size_snapping_fix")) // FIXME remove this, this is to detect old engines
- {
- draw_fontscale = fs;
- }
v = globalToBoxSize(v, draw_scale);
return v_x;
}