X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fmenu%2Fdraw.qc;h=b2ce50382a5e16b7a647085f93cd59ad16aede0f;hb=c8ee5421ec68d102e7b3d5861b698dc7f8e663bb;hp=ff9d9590d1864b89db9b7f33e7ef1dc86c1e700a;hpb=845401fd312c66c059aaee1772ac5d79555ab4fc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/menu/draw.qc b/qcsrc/menu/draw.qc index ff9d9590d..b2ce50382 100644 --- a/qcsrc/menu/draw.qc +++ b/qcsrc/menu/draw.qc @@ -1,3 +1,7 @@ +#include "draw.qh" +#include "../common/util.qh" +#include "../common/constants.qh" + string draw_mousepointer; vector draw_mousepointer_offset; vector draw_mousepointer_size; @@ -23,16 +27,6 @@ void draw_reset(float cw, float ch, float ox, float oy) draw_endBoldFont(); } -void draw_beginBoldFont() -{ - drawfont = FONT_USER+3; -} - -void draw_endBoldFont() -{ - drawfont = FONT_USER+0; -} - vector globalToBox(vector v, vector theOrigin, vector theScale) { v -= theOrigin; @@ -77,7 +71,7 @@ string draw_PreloadPictureWithFlags(string pic, float f) void draw_Picture(vector theOrigin, string pic, vector theSize, vector theColor, float theAlpha) { - if(theSize_x == 0 || theSize.y <= 0) // no default sizing please + if(theSize.x == 0 || theSize.y <= 0) // no default sizing please return; pic = draw_UseSkinFor(pic); drawpic(boxToGlobal(theOrigin, draw_shift, draw_scale), pic, boxToGlobalSize(theSize, draw_scale), theColor, theAlpha * draw_alpha, 0); @@ -277,7 +271,7 @@ void draw_BorderPicture(vector theOrigin, string pic, vector theSize, vector the void draw_Text(vector theOrigin, string theText, vector theSize, vector theColor, float theAlpha, float ICanHasKallerz) { if(theSize.x <= 0 || theSize.y <= 0) { - dprint("Drawing zero size text?\n"); + LOG_TRACE("Drawing zero size text?\n"); return; } @@ -303,7 +297,7 @@ float draw_TextWidth(string theText, float ICanHasKallerz, vector SizeThxBye) vector v; v = '0 0 0'; //float r; - v_x = stringwidth(theText, ICanHasKallerz, globalToBoxSize(boxToGlobalSize(SizeThxBye, draw_scale), draw_fontscale)); + v.x = stringwidth(theText, ICanHasKallerz, globalToBoxSize(boxToGlobalSize(SizeThxBye, draw_scale), draw_fontscale)); v = globalToBoxSize(v, draw_scale); return v.x; }