X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fdraw.qh;h=dbac8b8b190f90a6923ee30239ba4a9b7429c185;hb=f71c50e9ce5a364ebcd0b7c57b9b6621eb748d7c;hp=698c9262370974781c1f0585caaba18103d19ff7;hpb=df2fe9b28cb6210b671bec6d5ae834ff4eb2e2db;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/draw.qh b/qcsrc/lib/draw.qh index 698c92623..dbac8b8b1 100644 --- a/qcsrc/lib/draw.qh +++ b/qcsrc/lib/draw.qh @@ -5,7 +5,7 @@ #include "i18n.qh" #include "vector.qh" - #include + 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) { @@ -26,7 +26,7 @@ C = to + thickdir * (thickness / 2); D = to - thickdir * (thickness / 2); - R_BeginPolygon(texture, drawflag); + R_BeginPolygon(texture, drawflag, false); R_PolygonVertex(A, '0 0 0' + shift * '1 0 0', rgb, theAlpha); R_PolygonVertex(B, '0 1 0' + shift * '1 0 0', rgb, theAlpha); R_PolygonVertex(C, '0 1 0' + (shift + length_tex) * '1 0 0', rgb, theAlpha); @@ -117,12 +117,14 @@ } } + ERASEABLE void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, int flag) { position.x -= 2 / 3 * strlen(text) * theScale.x; 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);