GUI Scripting

From The DarkMod Wiki
Revision as of 12:47, 2 September 2011 by Tels (talk | contribs) (add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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