GameMaker Touhou Engine   Home   Downloads   Documentation

_MENU_PARENT


The parent object for menu screens (inherit from this if you wish to make a menu with more customization).


Locals:


Name Type Significance
_SELECTED Non-negative Integer The currently selected menu option, from the top.
_COLOR_FRONT_SELECTED Color The text color of a selected menu option. By default, it's white.
_COLOR_FRONT_NON_SELECTED Color The text color of a non-selected menu option. By default, it's gray.
_COLOR_FRONT_LOCKED Color The text color of a locked menu option. By default, it's dark gray.
_COLOR_BACK_SELECTED Color The text border color of a selected menu option. By default, it's #960505.
_COLOR_BACK_NON_SELECTED Color The text border color of a non-selected menu option. By default, it's #640505.
_COLOR_BACK_LOCKED Color The text border color of a locked menu option. By default, it's #320505.
_IMAGE_DATA Various Type Array The values in this array are triplets comprising of X, Y and a sprite index for images to be drawn by the menu.
_FONT Font The font that the menu should use. By default, it's the default game maker font (-1).
_OPTION_NAMES String Array The text for each menu option, from the top.
_OPTION_DISPLAY_X Integer Array The X-coordinate for each menu option, from the top.
_OPTION_DISPLAY_Y Integer Array The Y-coordinate for each menu option, from the top.
_OPTION_ROOM_CHANGE Room Reference Array The value to set global._NEXT_ROOM to when an option is selected. Set a value to noone to ignore, or to -1 to make the corresponding option exit the game.
_OPTION_INSTANCE_CREATE Object Reference Array The indexes of the objects that should be created when an option is seleceted. Set a value to noone to ignore.
_OPTION_CONDITIONS String Array Keys for boolean values inside global._DATA_MAP that dictate whether or not each option is unlocked. Set a value to an empty string to ignore.

Events:


Trigger # Actions
Create 1 Declare local variables as well as global._NEXT_ROOM and set global._STAGE_NUMBER to 0.
Draw 1 Set the drawing font to _FONT. Draw each sprite within _IMAGE_DATA, and then draw each menu option using _DRAW_TEXT_BORDER().
Press Up Arrow 1 If possible, move the selection upwards, skipping over locked options.
Press Down Arrow 1 If possible, move the selection downwards, skipping over locked options.
Press Z-Key 1 Perform the actions designated by locals according to the selected option.