1 void GameCommand_Init()
3 // make gg call menu QC commands
4 localcmd("alias qc_cmd \"menu_cmd $*\"\n");
7 void GameCommand(string command)
10 argc = tokenize(command);
12 if(argv(0) == "help" || argc == 0)
14 print("Usage: menu_cmd COMMAND..., where possible commands are:\n");
15 print(" sync - reloads all cvars on the current menu page\n");
16 print(" directmenu ITEM - select a menu item as main item\n");
17 GameCommand_Generic("help");
21 if(GameCommand_Generic(command))
26 for(self = null_entity; (self = nextent(self)); )
27 Raise_DataEvent(self, ITEM_DATA_SYNC);
29 for(self = null_entity; (self = findstring(self, type, "Item_Data_Cvar")); )
30 Raise_DataEvent(self, ITEM_DATA_SYNC);
31 for(self = null_entity; (self = findstring(self, type, "Item_Data_ServerCvar")); )
32 Raise_DataEvent(self, ITEM_DATA_SYNC);
37 if(argv(0) == "directmenu") if(argc == 2)
40 cvar_set("scmenu_directmenu", argv(1));
45 print("Invalid command. For a list of supported commands, try menu_cmd help.\n");