]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Move two more items to the new HUD system
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 14:54:59 +0000 (16:54 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Feb 2013 14:54:59 +0000 (16:54 +0200)
data/gfx/hud/sb_digestion.tga [deleted file]
data/gfx/hud/sb_digestion_active.tga [new file with mode: 0644]
data/gfx/hud/sb_digestion_impossible.tga [new file with mode: 0644]
data/gfx/hud/sb_digestion_possible.tga [new file with mode: 0644]
data/hudVT.cfg
data/qcsrc/client/hud.qc

diff --git a/data/gfx/hud/sb_digestion.tga b/data/gfx/hud/sb_digestion.tga
deleted file mode 100644 (file)
index 69ddf38..0000000
Binary files a/data/gfx/hud/sb_digestion.tga and /dev/null differ
diff --git a/data/gfx/hud/sb_digestion_active.tga b/data/gfx/hud/sb_digestion_active.tga
new file mode 100644 (file)
index 0000000..6293063
Binary files /dev/null and b/data/gfx/hud/sb_digestion_active.tga differ
diff --git a/data/gfx/hud/sb_digestion_impossible.tga b/data/gfx/hud/sb_digestion_impossible.tga
new file mode 100644 (file)
index 0000000..5193086
Binary files /dev/null and b/data/gfx/hud/sb_digestion_impossible.tga differ
diff --git a/data/gfx/hud/sb_digestion_possible.tga b/data/gfx/hud/sb_digestion_possible.tga
new file mode 100644 (file)
index 0000000..2db90fe
Binary files /dev/null and b/data/gfx/hud/sb_digestion_possible.tga differ
index a965ad829815a8ddf1cb0cf560f950fcde69ee7a..15d0a2f57abc58467f806ae0ccce7d9243db4893 100644 (file)
@@ -20,8 +20,16 @@ set hud_item_ammo_noload_text_position "0.025 -0.91 0"
 set hud_item_ammo_noload_text_scale 16\r
 set hud_item_ammo_load_text_position "0.015 -0.935 0"\r
 set hud_item_ammo_load_text_scale 12\r
-set hud_item_clip_load_text_position "0.03 -0.89 0"\r
-set hud_item_clip_load_text_scale 16\r
+set hud_item_ammo_load_clip_text_position "0.03 -0.89 0"\r
+set hud_item_ammo_load_clip_text_scale 16\r
+\r
+set hud_item_digestion_icon_position "-0.89 -0.53 0"\r
+set hud_item_digestion_icon_scale "0.02 0.03 0"\r
+\r
+set hud_item_stomach_load_single_text_position "-0.89 -0.47 0"\r
+set hud_item_stomach_load_single_text_scale 20\r
+set hud_item_stomach_load_double_text_position "-0.89 -0.47 0"\r
+set hud_item_stomach_load_double_text_scale 16\r
 \r
 set hud_item_predator_position "-0.64 -0.525 0"\r
 set hud_item_predator_scale "0.17 0.0175 0"\r
index c70501497f27be29dfbcc88a7dcee9a6d4050a3d..25aa1a8521036fbe58eed95ad21ada7132c5c992 100644 (file)
@@ -94,7 +94,7 @@ vector Sbar_ConvertToScreen_TextPosition(string text, vector position, float let
        vector pos, sz;\r
        sz_x = sz_y = lettersize;\r
        pos_x = (vid_conwidth / 2) * bound(0, 1 + position_x, 2);\r
-       pos_x -= stringwidth(text, FALSE, sz) * 0.5;\r
+       pos_x -= stringwidth(text, TRUE, sz) * 0.5;\r
        pos_y = (vid_conheight / 2) * bound(0, 1 - position_y, 2);\r
        pos_y -= sz_y / 2;\r
        return pos;\r
@@ -123,7 +123,7 @@ void Sbar_DrawString(string text, vector position, float lettersize)
        pos = Sbar_ConvertToScreen_TextPosition(text, position, lettersize);\r
        sz_x = sz_y = lettersize;\r
 \r
-       drawstring(pos, text, sz, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+       drawcolorcodedstring(pos, text, sz, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 }\r
 \r
 void Sbar_DrawXNum (vector position, float num, float digits, float showminusplus, float lettersize, vector rgb, float alpha, float dflags)\r
@@ -2170,9 +2170,9 @@ void Sbar_Status()
                                {\r
                                        weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);\r
                                        if(weapon_clipload < 0) // we're reloading\r
-                                               Sbar_DrawString("- -", stov(cvar_string("hud_item_clip_load_text_position")), cvar("hud_item_clip_load_text_scale"));\r
+                                               Sbar_DrawString("- -", stov(cvar_string("hud_item_ammo_load_clip_text_position")), cvar("hud_item_ammo_load_clip_text_scale"));\r
                                        else\r
-                                               Sbar_DrawXNum(stov(cvar_string("hud_item_clip_load_text_position")), weapon_clipload, 2, 0, cvar("hud_item_clip_load_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                                               Sbar_DrawXNum(stov(cvar_string("hud_item_ammo_load_clip_text_position")), weapon_clipload, 2, 0, cvar("hud_item_ammo_load_clip_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                        Sbar_DrawXNum(stov(cvar_string("hud_item_ammo_load_text_position")), a, 3, 0, cvar("hud_item_ammo_load_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                }\r
                                else\r
@@ -3278,24 +3278,23 @@ void Sbar_Draw (void)
                        if(stomach_load)\r
                        {\r
                                status_text = strcat(ftos(stomach_load), "^8/", status_color, ftos(stomach_maxload));\r
-                               status_pos = bottomleft - '-43 168 0';\r
-                               status_size = 16;\r
+                               status_pos = stov(cvar_string("hud_item_stomach_load_double_text_position"));\r
+                               status_size = cvar("hud_item_stomach_load_double_text_scale");\r
                        }\r
                        else\r
                        {\r
                                status_text = strcat(status_color, ftos(stomach_maxload));\r
-                               status_pos = bottomleft - '-43 170 0';\r
-                               status_size = 20;\r
+                               status_pos = stov(cvar_string("hud_item_stomach_load_single_text_position"));\r
+                               status_size = cvar("hud_item_stomach_load_single_text_scale");\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
+                       Sbar_DrawString(status_text, status_pos, status_size);\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
+                               Sbar_DrawPic("gfx/hud/sb_digestion_active", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
                        else if(stomach_load) // we can digest at this time\r
-                               drawpic(bottomleft - '-35 149 0', "gfx/hud/sb_digestion", '16 16 0', '0.25 0.25 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               Sbar_DrawPic("gfx/hud/sb_digestion_possible", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
                        else // we cannot digest at this time\r
-                               drawpic(bottomleft - '-35 149 0', "gfx/hud/sb_digestion", '16 16 0', '0.25 0 0', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                               Sbar_DrawPic("gfx/hud/sb_digestion_impossible", stov(cvar_string("hud_item_digestion_icon_position")), stov(cvar_string("hud_item_digestion_icon_scale")), FALSE);\r
 \r
                        // draw the stomach board player list\r
                        entity pl, pred;\r