]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Add text strings, which will be used later to describe what the ring is addressing
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 14:54:53 +0000 (17:54 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 14:54:53 +0000 (17:54 +0300)
data/qcsrc/client/sbar.qc

index 7fa1280d852f22f49b3039cfbf4af37feeb99a97..1b9c6f3315e55d4ad6964c4750a585107a2bb22a 100644 (file)
@@ -1980,14 +1980,24 @@ void Sbar_Timer()
 \r
 void Sbar_Ring()\r
 {\r
-       vector pos;\r
+       vector pos, text_pos, text_size;\r
+       float sz1, sz2;\r
        pos_x = vid_conwidth / 2;\r
        pos_y = vid_conheight / 1.375;\r
        pos_z = 0;\r
-\r
-       DrawCircleClippedPic(pos, 100, "gfx/hud/sb_ring.tga", 0.85, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
-\r
-       DrawCircleClippedPic(pos, 80, "gfx/hud/sb_ring.tga", 0.75, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+       sz1 = 60;\r
+       sz2 = 40;\r
+       text_size = '10 10 0';\r
+\r
+       DrawCircleClippedPic(pos, sz1, "gfx/hud/sb_ring.tga", 0.85, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+       text_pos_x = pos_x - stringwidth("Text 1 ssdfsdfdsfsdf", FALSE, text_size) / 2;\r
+       text_pos_y = pos_y - sz1 / 2 - vlen(text_size);\r
+       drawstring(text_pos, "Text 1 ssdfsdfdsfsdf", text_size, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+\r
+       DrawCircleClippedPic(pos, sz2, "gfx/hud/sb_ring.tga", 0.75, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+       text_pos_x = pos_x - stringwidth("Text 2 3453rf234f", FALSE, text_size) / 2;\r
+       text_pos_y = pos_y + sz1 / 2 + vlen(text_size);\r
+       drawstring(text_pos, "Text 2 3453rf234f", text_size, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 }\r
 \r
 void CSQC_Strength_Timer() {\r