From: MirceaKitsune Date: Thu, 17 May 2012 09:44:18 +0000 (+0300) Subject: Rename HUD cvars to match the architecture I had planned X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7c3df191228a8c3bc4f9384da459527b9c10d395;p=voretournament%2Fvoretournament.git Rename HUD cvars to match the architecture I had planned --- diff --git a/data/hudVT.cfg b/data/hudVT.cfg index 4df3dec8..d0b107ae 100644 --- a/data/hudVT.cfg +++ b/data/hudVT.cfg @@ -1,24 +1,24 @@ set hud_panel_status_background_position "0 -0.85 0" set hud_panel_status_background_scale "0.2 0.15 0" -set hud_panel_status_item_weapon_position "0 -0.85 0" -set hud_panel_status_item_weapon_scale "0.2 0.15 0" +set hud_item_weapon_position "0 -0.85 0" +set hud_item_weapon_scale "0.2 0.15 0" -set hud_panel_status_item_health_icon_position "-0.08 -0.91 0" -set hud_panel_status_item_health_icon_scale "0.035 0.05 0" -set hud_panel_status_item_health_text_position "-0.092 -0.85 0" -set hud_panel_status_item_health_text_scale 20 +set hud_item_health_icon_position "-0.08 -0.91 0" +set hud_item_health_icon_scale "0.035 0.05 0" +set hud_item_health_text_position "-0.092 -0.85 0" +set hud_item_health_text_scale 20 -set hud_panel_status_item_armor_icon_position "-0.091 -0.765 0" -set hud_panel_status_item_armor_icon_scale "0.015 0.03 0" -set hud_panel_status_item_armor_text_position "-0.092 -0.8 0" -set hud_panel_status_item_armor_text_scale 12 +set hud_item_armor_icon_position "-0.091 -0.765 0" +set hud_item_armor_icon_scale "0.015 0.03 0" +set hud_item_armor_text_position "-0.092 -0.8 0" +set hud_item_armor_text_scale 12 -set hud_panel_status_item_ammo_icon_position "0.095 -0.91 0" -set hud_panel_status_item_ammo_icon_scale "0.025 0.04 0" -set hud_panel_status_item_noload_ammo_text_position "0.025 0.91 0" -set hud_panel_status_item_noload_ammo_text_scale 16 -set hud_panel_status_item_load_ammo_text_position "0.015 -0.935 0" -set hud_panel_status_item_load_ammo_text_scale 12 -set hud_panel_status_item_load_clip_text_position "0.03 -0.89 0" -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" +set hud_item_ammo_icon_scale "0.025 0.04 0" +set hud_item_ammo_noload_text_position "0.025 0.91 0" +set hud_item_ammo_noload_text_scale 16 +set hud_item_ammo_load_text_position "0.015 -0.935 0" +set hud_item_ammo_load_text_scale 12 +set hud_item_clip_load_text_position "0.03 -0.89 0" +set hud_item_clip_load_text_scale 16 \ No newline at end of file diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index ab126e5a..2b01044c 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -2023,14 +2023,14 @@ void Sbar_Status() x = armor; if (x > 0) { - 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); - 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); + Sbar_DrawPic("gfx/hud/sb_armor", stov(cvar_string("hud_item_armor_icon_position")), stov(cvar_string("hud_item_armor_icon_scale")), FALSE); + 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); } // health x = health; - 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); - 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); + Sbar_DrawPic("gfx/hud/sb_health", stov(cvar_string("hud_item_health_icon_position")), stov(cvar_string("hud_item_health_icon_scale")), FALSE); + 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); // if we are dead, we can skip the HUD from here if(health <= 0) @@ -2043,8 +2043,8 @@ void Sbar_Status() if(stat_items & IT_JETPACK && button_jetpack) { a = getstati(GetAmmoStat(0)); // how much fuel do we have? - 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); - 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); + Sbar_DrawPic(GetAmmoPicture(0), stov(cvar_string("hud_item_ammo_icon_position")), stov(cvar_string("hud_item_ammo_noload_icon_scale")), FALSE); + 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); } else { @@ -2056,7 +2056,7 @@ void Sbar_Status() // if (stat_items & GetAmmoItemCode(i)) { a = getstati(GetAmmoStat(i)); // how much ammo do we have of type i? - 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); + Sbar_DrawPic(GetAmmoPicture(i), stov(cvar_string("hud_item_ammo_icon_position")), stov(cvar_string("hud_item_ammo_icon_scale")), FALSE); weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE); // if the weapon we're holding is reloadable, show both its ammo and load @@ -2064,14 +2064,14 @@ void Sbar_Status() { weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD); if(weapon_clipload < 0) // we're reloading - Sbar_DrawString("- -", stov(cvar_string("hud_panel_status_item_load_clip_text_position")), cvar("hud_panel_status_item_load_clip_text_scale")); + Sbar_DrawString("- -", stov(cvar_string("hud_item_clip_load_text_position")), cvar("hud_item_clip_load_text_scale")); else - 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); - 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); + 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); + 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); } else { - 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); + 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); } } } @@ -2081,7 +2081,7 @@ void Sbar_Status() entity e; e = get_weaponinfo(activeweapon); if (e && e.netname != "" && e.netname != "N/A") - 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); + 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); } void Sbar_Timer()