17 if (s ==
"") s = me.classname;
18 else s =
strcat(me.classname,
": ", s);
44 string ss = strtolower(
argv(0));
47 if (
argv(0) ==
"help" || argc == 0)
49 LOG_HELP(
"Usage:^3 menu_cmd <command> [<item>], where possible commands are:");
50 LOG_HELP(
" 'sync' reloads all cvars on the current menu page");
51 LOG_HELP(
" 'directmenu' shows the menu window named <item> (or the menu window containing an item named <item>)");
52 LOG_HELP(
" if <item> is not specified it shows the list of available items in the console");
53 LOG_HELP(
" 'dumptree' dumps the state of the menu as a tree to the console");
55 LOG_HELP(
"\nGeneric commands shared by all programs:");
63 if (
argv(0) ==
"sync")
69 if (
argv(0) ==
"update_conwidths_before_vid_restart")
75 if (
argv(0) ==
"directmenu" ||
argv(0) ==
"directpanelhudmenu")
78 if (
argv(0) ==
"directpanelhudmenu") filter =
"HUD";
85 if (it.classname ==
"vtbl") continue;
89 if (!startsWith(s, filter)) continue;
90 s = substring(s, strlen(filter), strlen(s) - strlen(filter));
95 else if (argc == 2 && !
isdemo())
103 if (
argv(0) ==
"skinselect")
109 if (
argv(0) ==
"languageselect")
111 m_goto(
"languageselector");
115 if (
argv(0) ==
"videosettings")
121 if (
argv(0) ==
"dumptree")
131 LOG_INFO(
"Invalid command. For a list of supported commands, try menu_cmd help.");
float GenericCommand(string command)
void depthfirst(entity start,.entity up,.entity downleft,.entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
#define FOREACH_ENTITY_ORDERED(cond, body)
void GenericCommand_macro_help()
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define MUTATOR_CALLHOOK(id,...)
#define pass(name, colormin, colormax)