]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/draw.qc
Replace print calls with logger calls
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / draw.qc
index fa7c65c51cde498ef3ec7bdb03446345a32bb586..7edc6eff50d8a4c172371d19c026e10fecba6b46 100644 (file)
@@ -1,7 +1,6 @@
-#if defined(CSQC)
-#elif defined(MENUQC)
-#elif defined(SVQC)
-#endif
+#include "draw.qh"
+#include "../common/util.qh"
+#include "../common/constants.qh"
 
 string draw_mousepointer;
 vector draw_mousepointer_offset;
@@ -82,7 +81,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);
@@ -282,7 +281,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;
        }
 
@@ -308,7 +307,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;
 }