These functions are responsible for controlling the programmer-defined menu system.

Properties


Functions




property MenuMouseSprite = null

Chooses which sprite resource to use as the mouse pointer (a.k.a. cursor) whenever a menu is active. If no menu mouse sprite is assigned, the DefaultMouseSprite will be shown instead (assuming that is assigned!).




property MenuMouseFrame = 0

Chooses which frame of the MenuMouseSprite to display whenever a menu is active.




function Menu (HandlerScriptIndex)

Uses a menu handler script to display a menu and handle its input. While a menu is displayed, the game will remain paused (along with all the currently running scripts).

If the menu handler gets passed the special key code <DRAW>, it must redraw the menu. Also, the special code <INIT> is passed to the handler immediately after the menu function is called, so that any static variables that the menu used may be initialized, or resources marked.

All other key codes correspond to a mouse click or release, or a key press or release.

If the menu function is called from inside another menu handler, it will effectively switch to the new menu.

Parameters

HandlerScriptIndex Index of the script that will be called by the interpreter to handle menu actions. The handler script should accept one argument, the menu action.
See Also...