]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/draw.qc
Update default video settings
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / draw.qc
index ae6967e367565fc02c38f08f57c77ac0ccca706d..2bfb955c575017ca614e100e40ff82d79b0eb201 100644 (file)
@@ -1,6 +1,6 @@
 #include "draw.qh"
-#include "../common/util.qh"
-#include "../common/constants.qh"
+#include <common/util.qh>
+#include <common/constants.qh>
 
 string draw_mousepointer;
 vector draw_mousepointer_offset;
@@ -83,6 +83,17 @@ vector draw_PictureSize(string pic)
        return drawgetimagesize(pic);
 }
 
+bool draw_PictureExists(string pic)
+{
+       pic = draw_UseSkinFor(pic);
+       if (fexists(strcat(pic, ".tga"))) return true;
+       if (fexists(strcat(pic, ".png"))) return true;
+       if (fexists(strcat(pic, ".jpg"))) return true;
+       if (fexists(strcat(pic, ".pcx"))) return true;
+
+       return false;
+}
+
 void draw_Fill(vector theOrigin, vector theSize, vector theColor, float theAlpha)
 {
        drawfill(boxToGlobal(theOrigin, draw_shift, draw_scale), boxToGlobalSize(theSize, draw_scale), theColor, theAlpha * draw_alpha, 0);