These functions are responsible for controlling the programmer-defined menu system.
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.