Rename HUD cvars to match the architecture I had planned
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 May 2012 09:44:18 +0000 (12:44 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 17 May 2012 09:44:18 +0000 (12:44 +0300)
data/hudVT.cfg
data/qcsrc/client/hud.qc

index 4df3dec..d0b107a 100644 (file)
@@ -1,24 +1,24 @@
 set hud_panel_status_background_position "0 -0.85 0"\r
 set hud_panel_status_background_scale "0.2 0.15 0"\r
 \r
-set hud_panel_status_item_weapon_position "0 -0.85 0"\r
-set hud_panel_status_item_weapon_scale "0.2 0.15 0"\r
+set hud_item_weapon_position "0 -0.85 0"\r
+set hud_item_weapon_scale "0.2 0.15 0"\r
 \r
-set hud_panel_status_item_health_icon_position "-0.08 -0.91 0"\r
-set hud_panel_status_item_health_icon_scale "0.035 0.05 0"\r
-set hud_panel_status_item_health_text_position "-0.092 -0.85 0"\r
-set hud_panel_status_item_health_text_scale 20\r
+set hud_item_health_icon_position "-0.08 -0.91 0"\r
+set hud_item_health_icon_scale "0.035 0.05 0"\r
+set hud_item_health_text_position "-0.092 -0.85 0"\r
+set hud_item_health_text_scale 20\r
 \r
-set hud_panel_status_item_armor_icon_position "-0.091 -0.765 0"\r
-set hud_panel_status_item_armor_icon_scale "0.015 0.03 0"\r
-set hud_panel_status_item_armor_text_position "-0.092 -0.8 0"\r
-set hud_panel_status_item_armor_text_scale 12\r
+set hud_item_armor_icon_position "-0.091 -0.765 0"\r
+set hud_item_armor_icon_scale "0.015 0.03 0"\r
+set hud_item_armor_text_position "-0.092 -0.8 0"\r
+set hud_item_armor_text_scale 12\r
 \r
-set hud_panel_status_item_ammo_icon_position "0.095 -0.91 0"\r
-set hud_panel_status_item_ammo_icon_scale "0.025 0.04 0"\r
-set hud_panel_status_item_noload_ammo_text_position "0.025 0.91 0"\r
-set hud_panel_status_item_noload_ammo_text_scale 16\r
-set hud_panel_status_item_load_ammo_text_position "0.015 -0.935 0"\r
-set hud_panel_status_item_load_ammo_text_scale 12\r
-set hud_panel_status_item_load_clip_text_position "0.03 -0.89 0"\r
-set hud_panel_status_item_load_clip_text_scale 16
\ No newline at end of file
+set hud_item_ammo_icon_position "0.095 -0.91 0"\r
+set hud_item_ammo_icon_scale "0.025 0.04 0"\r
+set hud_item_ammo_noload_text_position "0.025 0.91 0"\r
+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
\ No newline at end of file
index ab126e5..2b01044 100644 (file)
@@ -2023,14 +2023,14 @@ void Sbar_Status()
        x = armor;\r
        if (x > 0)\r
        {\r
-               Sbar_DrawPic("gfx/hud/sb_armor", stov(cvar_string("hud_panel_status_item_armor_icon_position")), stov(cvar_string("hud_panel_status_item_armor_icon_scale")), FALSE);\r
-               Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_armor_text_position")), x, 3, 0, cvar("hud_panel_status_item_armor_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               Sbar_DrawPic("gfx/hud/sb_armor", stov(cvar_string("hud_item_armor_icon_position")), stov(cvar_string("hud_item_armor_icon_scale")), FALSE);\r
+               Sbar_DrawXNum(stov(cvar_string("hud_item_armor_text_position")), x, 3, 0, cvar("hud_item_armor_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
        }\r
 \r
        // health\r
        x = health;\r
-       Sbar_DrawPic("gfx/hud/sb_health", stov(cvar_string("hud_panel_status_item_health_icon_position")), stov(cvar_string("hud_panel_status_item_health_icon_scale")), FALSE);\r
-       Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_health_text_position")), x, 3, 0, cvar("hud_panel_status_item_health_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+       Sbar_DrawPic("gfx/hud/sb_health", stov(cvar_string("hud_item_health_icon_position")), stov(cvar_string("hud_item_health_icon_scale")), FALSE);\r
+       Sbar_DrawXNum(stov(cvar_string("hud_item_health_text_position")), x, 3, 0, cvar("hud_item_health_text_scale"), Sbar_NumColor(x), sbar_alpha_fg, DRAWFLAG_NORMAL);\r
 \r
        // if we are dead, we can skip the HUD from here\r
        if(health <= 0)\r
@@ -2043,8 +2043,8 @@ void Sbar_Status()
        if(stat_items & IT_JETPACK && button_jetpack)\r
        {\r
                a = getstati(GetAmmoStat(0)); // how much fuel do we have?\r
-               Sbar_DrawPic(GetAmmoPicture(0), stov(cvar_string("hud_panel_status_item_ammo_icon_position")), stov(cvar_string("hud_panel_status_item_noload_ammo_icon_scale")), FALSE);\r
-               Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_noload_ammo_text_position")), a, 3, 0, cvar("hud_panel_status_item_noload_ammo_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+               Sbar_DrawPic(GetAmmoPicture(0), stov(cvar_string("hud_item_ammo_icon_position")), stov(cvar_string("hud_item_ammo_noload_icon_scale")), FALSE);\r
+               Sbar_DrawXNum(stov(cvar_string("hud_item_ammo_noload_text_position")), a, 3, 0, cvar("hud_item_ammo_noload_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
        }\r
        else\r
        {\r
@@ -2056,7 +2056,7 @@ void Sbar_Status()
                        // if (stat_items & GetAmmoItemCode(i))\r
                        {\r
                                a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i?\r
-                               Sbar_DrawPic(GetAmmoPicture(i), stov(cvar_string("hud_panel_status_item_ammo_icon_position")), stov(cvar_string("hud_panel_status_item_ammo_icon_scale")), FALSE);\r
+                               Sbar_DrawPic(GetAmmoPicture(i), stov(cvar_string("hud_item_ammo_icon_position")), stov(cvar_string("hud_item_ammo_icon_scale")), FALSE);\r
                                weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);\r
 \r
                                // if the weapon we're holding is reloadable, show both its ammo and load\r
@@ -2064,14 +2064,14 @@ 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_panel_status_item_load_clip_text_position")), cvar("hud_panel_status_item_load_clip_text_scale"));\r
+                                               Sbar_DrawString("- -", stov(cvar_string("hud_item_clip_load_text_position")), cvar("hud_item_clip_load_text_scale"));\r
                                        else\r
-                                               Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_load_clip_text_position")), weapon_clipload, 2, 0, cvar("hud_panel_status_item_load_clip_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
-                                       Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_load_ammo_text_position")), a, 3, 0, cvar("hud_panel_status_item_load_ammo_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\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_text_position")), a, 3, 0, cvar("hud_item_ammo_load_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                }\r
                                else\r
                                {\r
-                                       Sbar_DrawXNum(stov(cvar_string("hud_panel_status_item_noload_ammo_text_position")), a, 3, 0, cvar("hud_panel_status_item_noload_ammo_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+                                       Sbar_DrawXNum(stov(cvar_string("hud_item_ammo_noload_text_position")), a, 3, 0, cvar("hud_item_ammo_noload_text_scale"), '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
                                }\r
                        }\r
                }\r
@@ -2081,7 +2081,7 @@ void Sbar_Status()
        entity e;\r
        e = get_weaponinfo(activeweapon);\r
        if (e && e.netname != "" && e.netname != "N/A")\r
-               Sbar_DrawPic(strcat("gfx/hud/bg_status_activeweapon_", e.netname), stov(cvar_string("hud_panel_status_item_weapon_position")), stov(cvar_string("hud_panel_status_item_weapon_scale")), FALSE);\r
+               Sbar_DrawPic(strcat("gfx/hud/bg_status_activeweapon_", e.netname), stov(cvar_string("hud_item_weapon_position")), stov(cvar_string("hud_item_weapon_scale")), FALSE);\r
 }\r
 \r
 void Sbar_Timer()\r