|Note: This feature is for ZScript only.|
As of GZDoom 2.4, most of the internal menu handling has been exported to ZScript, allowing for modders to create flexible and highly customizable menus. However, menus are also (one of) the most complex systems to work with in ZScript. Knowledge on the workings and mechanics of ZScript itself may help.
Before starting, knowing the scope system is highly recommended. Every menu and function (except for Menu.SetMenu (New from )) has a ui scope. This means only approved functions can access actors such as CountInv, which are marked within actors.txt as 'clearscope'.
Menus themselves are the very base foundations which hold items (see below), displaying and interacting them all on screen. Several types of menus are available:
|Menu||The super class, inherited from by all menus internally.|
|ListMenu||Used for Doom's main menu.|
|OptionMenu||Used for most menus under the Options submenu.|
|GenericMenu||A completely blank template for modders who wish to redesign menus in their own way.|
NOTE: For completely custom menus, inheritance must be done with GenericMenu, NOT the base menu!
Each of these can be inherited by a child class to gain functions and properties. GenericMenu simply inherits and does not change anything from the base Menu class except for initialization, while ListMenu and OptionMenu come with a plethora of menu items and pre-programmed functionality.
Items are referred to the objects being displayed on screen while inside a menu, regardless of interactive or static. All items inherit from the super class MenuItemBase.
For a more exhaustive listing of items, see the class pages directly.
|MenuItemBase||-||-||Super||The super class, inherited from by all menu items internally.|
||MenuItemBase||OptionMenu||The base class for all items used in OptionMenus. Not usable by itself.|
||MenuItemBase||ListMenu||The base class for all items used in ListMenus. Not usable by itself.|