GUI Scripting: Parsing of Set 'Cmd'
From The DarkMod Wiki
GUI commands
Commands in the main menu like:
set "command argument1 argument2;"
are handled in idGameLocal::HandleMainMenuCommands() in game/game_loca.cpp.
For each of the parts "command", "argument1", "argument2" and the final ";" (even if this is ommitted!), the routine is called again. It therefore keeps a stack of these parts, and when it sees the final ";", handles the command and clears the stack before returning.
Even if you just use
set command
the routine will be called twice, once with "command" and once with ";" as the menuCommand parameter.
See also
- Introduction to Doom3 GUIs
- GUI Scripting on modwiki
- The "set" command on modiwki