]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/draw.qh
Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / draw.qh
index 40900b8772314837defb913413fb9f60dabb6c4c..2bf480a8782aed99c16167731c5f38efd1300fcd 100644 (file)
@@ -1,11 +1,11 @@
+#pragma once
+
 #ifdef CSQC
-#ifndef DRAW_H
-       #define DRAW_H
 
        #include "i18n.qh"
        #include "vector.qh"
 
-       #include "../client/defs.qh"
+       float vid_conwidth;
 
        void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
        {
@@ -46,7 +46,7 @@
        {
                if (theBorderSize.x < 0 && theBorderSize.y < 0)  // draw whole image as it is
                {
-                       drawpic(theOrigin, pic, theSize, theColor, theAlpha, 0);
+                       drawpic_builtin(theOrigin, pic, theSize, theColor, theAlpha, 0);
                        return;
                }
                if (theBorderSize.x == 0 && theBorderSize.y == 0)  // no border
                }
        }
 
+       ERASEABLE
        void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag)
        {
                position.x -= 2 / 3 * strlen(text) * theScale.x;
-               drawstring(position, text, theScale, rgb, theAlpha, flag);
+               drawstring_builtin(position, text, theScale, rgb, theAlpha, flag);
        }
 
+       ERASEABLE
        void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag)
        {
                position.x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale.x);
-               drawstring(position, text, theScale, rgb, theAlpha, flag);
+               drawstring_builtin(position, text, theScale, rgb, theAlpha, flag);
        }
 
 #endif
-#endif