]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/draw.qc
Make menu includes order insensitive
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / draw.qc
index ff9d9590d1864b89db9b7f33e7ef1dc86c1e700a..2796c05706d0647662ebff6c4dafd88ac5c24b7b 100644 (file)
@@ -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;
@@ -77,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);
@@ -303,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;
 }