]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Cvar to change file source for the quick menu
authorterencehill <piuntn@gmail.com>
Sat, 3 Dec 2011 21:29:44 +0000 (22:29 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 3 Dec 2011 21:29:44 +0000 (22:29 +0100)
_hud_common.cfg
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc

index c46bbee713bf099c6bf74b45e474ee7baea0a559..cc4d1c8748ad82e3a53e8317b306b5a607469c9e 100644 (file)
@@ -26,6 +26,8 @@ seta hud_panel_engineinfo_framecounter_exponentialmovingaverage 1 "use an averag
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight 0.1 "weight of latest data point"
 seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_change_threshold 0.5 "threshold for fps change when to update instantly, to make big fps changes update faster"
 
+seta hud_panel_quickmenu_file quickmenu.txt "load the quick menu from this file"
+
 // hud panel aliases
 alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4"
 alias +hud_panel_radar_maximized "cl_cmd hud_panel_radar_maximized 1"
index b7f96375cbfcdeab03870e69f93b588753499520..629fa915135adbc8075f3848637604a5d8404e13 100644 (file)
@@ -281,6 +281,7 @@ string autocvar_hud_panel_powerups_progressbar_strength;
 float autocvar_hud_panel_powerups_text;
 float autocvar_hud_panel_pressedkeys;
 float autocvar_hud_panel_pressedkeys_aspect;
+string autocvar_hud_panel_quickmenu_file;
 float autocvar_hud_panel_racetimer;
 float autocvar_hud_panel_radar;
 float autocvar_hud_panel_radar_foreground_alpha;
index 0887a7509990c9f896c150a4ad2822a014e1ef44..f3ea3d1b627418a761421086f52e17f43957a26f 100644 (file)
@@ -4806,10 +4806,10 @@ float HUD_QuickMenu_Buffer_Init()
 {
        float fh, i;
        string s;
-       fh = fopen("quickmenu.txt", FILE_READ);
+       fh = fopen(autocvar_hud_panel_quickmenu_file, FILE_READ);
        if(fh < 0)
        {
-               print("Error: Couldn't open file quickmenu.txt!\n");
+               print(sprintf("Error: Couldn't open file %d!\n", autocvar_hud_panel_quickmenu_file));
                return false;
        }