From: FruitieX Date: Thu, 10 Jun 2010 00:22:32 +0000 (+0300) Subject: move HUD_Panel_GetName into common/util.qc for easy menu access X-Git-Tag: xonotic-v0.1.0preview~541^2~69^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b5173b18fa20e7ac5577beb067201ba7ba3f6598;p=xonotic%2Fxonotic-data.pk3dir.git move HUD_Panel_GetName into common/util.qc for easy menu access --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index ab59b5c23..0db9ffe1b 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -550,26 +550,6 @@ HUD panels ================== */ -string HUD_Panel_GetName(float id) -{ - switch(id) { - case 0: return "weaponicons"; break; - case 1: return "inventory"; break; - case 2: return "powerups"; break; - case 3: return "healtharmor"; break; - case 4: return "notify"; break; - case 5: return "timer"; break; - case 6: return "radar"; break; - case 7: return "score"; break; - case 8: return "racetimer"; break; - case 9: return "vote"; break; - case 10: return "modicons"; break; - case 11: return "pressedkeys"; break; - case 12: return "chat"; break; - default: return ""; - } -} - // Save the config void HUD_Panel_ExportCfg(string cfgname) { diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 9875529d3..bad6ee940 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -1948,3 +1948,25 @@ float get_model_parameters(string m, float sk) return 1; } + +// return name of given panel id +string HUD_Panel_GetName(float id) +{ + switch(id) { + case 0: return "weaponicons"; break; + case 1: return "inventory"; break; + case 2: return "powerups"; break; + case 3: return "healtharmor"; break; + case 4: return "notify"; break; + case 5: return "timer"; break; + case 6: return "radar"; break; + case 7: return "score"; break; + case 8: return "racetimer"; break; + case 9: return "vote"; break; + case 10: return "modicons"; break; + case 11: return "pressedkeys"; break; + case 12: return "chat"; break; + default: return ""; + } +} + diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 23126b633..2a57be012 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -210,3 +210,5 @@ float get_model_parameters_weight; float get_model_parameters_age; string get_model_parameters_desc; float get_model_parameters(string mod, float skn); // call with string_null to clear; skin -1 means mod is the filename of the txt file and is to be split + +string HUD_Panel_GetName(float id)