seta hud_panel_quickmenu_file "" "load the quick menu from this file (empty or 0 to disable)"
seta hud_panel_quickmenu_translatecommands 0 "when the game is translated, translate strings inside commands too (useful for chat commands)"
+seta hud_panel_quickmenu_time 5 "quickmenu expires after this number of seconds in the same page"
// hud panel aliases
alias hud_panel_radar_rotate "toggle hud_panel_radar_rotation 0 1 2 3 4"
float autocvar_hud_panel_pressedkeys_attack;
float autocvar_hud_panel_quickmenu_translatecommands;
string autocvar_hud_panel_quickmenu_file;
+float autocvar_hud_panel_quickmenu_time;
float autocvar_hud_panel_racetimer;
float autocvar_hud_panel_radar;
float autocvar_hud_panel_radar_foreground_alpha;
string QuickMenu_CurrentSubMenu;
float QuickMenu_CurrentPage_FirstEntry;
var float QuickMenu_Entries;
+float QuickMenu_TimeOut;
void HUD_QuickMenu_load_entry(float i, string s, string s1)
{
//printf("^xc80 entry %d: %s, %s\n", i, s, s1);
if(QuickMenu_Buffer < 0)
return false;
HUD_QuickMenu_Load_DefaultEntries();
+ QuickMenu_TimeOut = time + autocvar_hud_panel_quickmenu_time;
return true;
}
bufstr_set(QuickMenu_Buffer, QuickMenu_Buffer_Size, argv(1)); // command
}
++QuickMenu_Buffer_Size;
+ QuickMenu_TimeOut = time + autocvar_hud_panel_quickmenu_time;
}
if (QuickMenu_Buffer_Size <= 0)
HUD_QuickMenu_Close();
return 0;
}
+ QuickMenu_TimeOut = time + autocvar_hud_panel_quickmenu_time;
return 1;
}
if(mv_active) return;
//if(!autocvar_hud_panel_quickmenu) return;
if(!hud_panel_quickmenu) return;
+
+ if(time > QuickMenu_TimeOut)
+ {
+ HUD_QuickMenu_Close();
+ return;
+ }
}
else
{