On-screen menu handling world-specific functions.
More...
|
#define | MENU_TABLE(f) f( 0, main ) f( 1, items ) f( 2, craft ) f( 3, save ) f( 4, quit ) |
| Defines the top-level menu items and callbacks used to handle each submenu.
|
|
#define | MENU_TEXT_SZ 20 |
| Maximum length of a menu item's display text.
|
|
#define | MENU_RENDERER_PROTOTYPES(idx, name) void menu_renderer_ ## name( struct DSEKAI_STATE* state ); |
|
#define | MENU_HANDLER_PROTOTYPES(idx, name) int16_t menu_handler_ ## name( INPUT_VAL in_char, int16_t click_x, int16_t click_y, struct DSEKAI_STATE* state ); |
|
#define | MENU_FLAG_ITEM_OPEN_SEL_USE 0x01 |
|
#define | MENU_FLAG_ITEM_OPEN_SEL_CRAFT 0x02 |
|
#define | MENU_FLAG_ITEM_OPEN_SEL_DROP 0x03 |
|
#define | MENU_FLAG_ITEM_OPEN_SEL_MASK 0x03 |
|
#define | MENU_TABLE_CONSTS(idx, name) extern RES_CONST uint8_t gc_menu_idx_ ## name; |
|
|
typedef void(* | MENU_RENDERER) (struct DSEKAI_STATE *state) |
| Render a currently active menu on-screen.
|
|
typedef int16_t(* | MENU_HANDLER) (INPUT_VAL in_char, int16_t click_x, int16_t click_y, struct DSEKAI_STATE *state) |
| Handle input for a currently active menu.
|
|
|
void | menu_open (struct DSEKAI_STATE *state) |
| Open the on-screen menu, pausing the current engine.
|
|
void | menu_close (struct DSEKAI_STATE *state) |
| Close the on-screen menu, resuming the current engine.
|
|
On-screen menu handling world-specific functions.
◆ gc_menu_handlers
Table of callacks used to handle menu input.
These should close the menu's WINDOW and set MENU_FLAG_DIRTY on global MENU_STATE.
◆ gc_menu_renderers
Table of callbacks used to draw menus.
These are called once when the menu is opened, and should create a WINDOW.