]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Draw text bigger when showing only the capacity
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 15:49:46 +0000 (18:49 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 18 Jul 2011 15:49:46 +0000 (18:49 +0300)
data/qcsrc/client/sbar.qc

index fd3c1bbf4e50e80d804e77c117e00ef6f5c74f82..5f15dfeea2e768eb790431cbf3c0f8609b805c81 100644 (file)
@@ -3033,13 +3033,21 @@ void Sbar_Draw (void)
 \r
                        vector status_pos;\r
                        string status_text;\r
+                       float status_size;\r
                        if(stomach_load)\r
+                       {\r
                                status_text = strcat(ftos(stomach_load), "^8/^7", ftos(stomach_maxload), "%");\r
+                               status_pos = bottomleft - '-44 168 0';\r
+                               status_size = 16;\r
+                       }\r
                        else\r
+                       {\r
                                status_text = strcat(ftos(stomach_maxload), "%");\r
-                       status_pos = bottomleft - '-44 168 0';\r
-                       status_pos -= '1 0 0' * stringwidth(status_text, TRUE, '16 16 0') * 0.5;\r
-                       drawcolorcodedstring(status_pos, status_text, '16 16 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               status_pos = bottomleft - '-44 170 0';\r
+                               status_size = 20;\r
+                       }\r
+                       status_pos -= '1 0 0' * stringwidth(status_text, TRUE, '1 0 0' * status_size) * 0.5;\r
+                       drawcolorcodedstring(status_pos, status_text, '1 1 0' * status_size, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
                        if(getstati(STAT_VORE_DIGESTING)) // we are currently digesting\r
                                drawpic(bottomleft - '-35 149 0', "gfx/hud/sb_digestion", '16 16 0', '0 1 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r