From 2e36607660388dbcadb21752365e374c47378708 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 3 Dec 2011 22:29:44 +0100 Subject: [PATCH] Cvar to change file source for the quick menu --- _hud_common.cfg | 2 ++ qcsrc/client/autocvars.qh | 1 + qcsrc/client/hud.qc | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/_hud_common.cfg b/_hud_common.cfg index c46bbee71..cc4d1c874 100644 --- a/_hud_common.cfg +++ b/_hud_common.cfg @@ -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" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index b7f96375c..629fa9151 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -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; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 0887a7509..f3ea3d1b6 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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; } -- 2.39.2