include/window/select.h
The selection screen: the row of icons a command, item or Psynergy is picked from, its icons and their sprites.
Included by menu_internal.h and window_internal.h.
Structures
| Name | Description | |
|---|---|---|
struct | SELECTION_SPR | A selection screen sprite: a list link and its OAM attributes. |
struct | SELECTION_NODE | An icon of the selection screen: its list links, the entry it shows, its place and its slide toward a target, its zoom and its sprite. |
struct | SELECTION_MENU_STATE | The selection screen (HEAP_SLOT_SELECTION_MENU): the row of icons the player picks from, with arrows at each end and a pointing hand over the chosen target. |
Macros
| Name | Description | |
|---|---|---|
#define | SELECTION_STATUS_SCROLLING 33 | SELECTION_MENU_STATE.status: the cursor stepping, or the row shown. |
#define | SELECTION_STATUS_SHOWN 1 | |
#define | SELECTION_CURSOR_RESET 0x80 | The bit of SELECTION_MENU_STATE.cursorIndex set as an entry is chosen, on which mnSelectionMenuClear puts the next list's top and cursor back to its first entry. |
Enumerations
| Name | Description | |
|---|---|---|
enum | ICON_KIND { ICON_KIND_NONE, ICON_KIND_COMMAND, ICON_KIND_ITEM, ICON_KIND … } | The kinds of icon the selection screen lists (SELECTION_NODE.kind) and mnSelectionIconLoad loads. |
enum | SELECTION_RECORD { SELECTION_RECORD_ROW, SELECTION_RECORD_CHOSEN, SELECTION_REC … } | The entries of SELECTION_MENU_STATE.records. |
Functions
| Name | Description | |
|---|---|---|
void * | mnIconMenuOpen (void) | Allocates and clears the icon menu's state, which lives in HEAP_SLOT_ICON_MENU until mnIconMenuClose frees it, and starts the event that draws its icons. |
void | mnIconMenuAddIcon (Sint32 icon) | Appends a command icon while the menu has room for one (ICON_MENU_STATE's six entries). |
void | mnIconMenuClose (void) | Stops drawing the icons, closes the label window and releases each loaded icon before freeing the icon menu's state (HEAP_SLOT_ICON_MENU), then waits a tick. |
void | mnSelectionMenuFreeLargeIcon (void) | Frees the large icon's VRAM cache entry, if it holds one, and marks it empty. |
void | mnIconMenuLayoutIcons (Sint32 x, Sint32 y, Sint32 w, Sint32 h) | Places the icons three tiles apart from tile (x, y), then opens their label window, width + 2 tiles wide, just after them. |
Sint32 | mnIconMenuRun (Sint32 init) | Selects an icon position with wrapped directional input. |
Sint32 | mnSelectionIconLoad (Uint32 mode, Sint32 value) | Loads the icon of a selection entry of kind mode (ICON_KIND) into a free sprite tile slot and returns the slot, or -1. |
SELECTION_NODE * | mnSelectionMenuGetCursorNode (SELECTION_MENU_STATE *screen) | Returns the icon of the row the hand points at (cursorIndex). |
Description
The selection screen: the row of icons a command, item or Psynergy is picked from, its icons and their sprites.
Macros in detail
SELECTION_STATUS_SCROLLING
#define SELECTION_STATUS_SCROLLING 33
SELECTION_MENU_STATE.status: the cursor stepping, or the row shown.
Referenced by mnConfirmSelection(), mnMoveSelectionBackward(), mnMoveSelectionForward(), mnSelectionMenuStepLeft() and mnSelectionMenuStepRight().
Definition at line 132 of file select.h.
SELECTION_STATUS_SHOWN
#define SELECTION_STATUS_SHOWN 1
Referenced by mnMoveSelectionBackward(), mnMoveSelectionForward(), mnSelectionMenuStepLeft() and mnSelectionMenuStepRight().
Definition at line 133 of file select.h.
SELECTION_CURSOR_RESET
#define SELECTION_CURSOR_RESET 0x80
The bit of SELECTION_MENU_STATE.cursorIndex set as an entry is chosen, on
which mnSelectionMenuClear puts the next list's top and cursor back to its
first entry.
Referenced by mnConfirmSelection(), mnSelectionMenuClear() and mnSelectionMenuCreate().
Definition at line 148 of file select.h.
Enumerations in detail
ICON_KIND
enum ICON_KIND
The kinds of icon the selection screen lists (SELECTION_NODE.kind) and
mnSelectionIconLoad loads.
| Enumerator | Value | Description |
|---|---|---|
ICON_KIND_NONE | 0 | a free selection icon entry |
ICON_KIND_COMMAND | 1 | a command's icon, from its number |
ICON_KIND_ITEM | 2 | an item's icon |
ICON_KIND_ABILITY | 4 | a Psynergy's icon, from its ability number |
ICON_KIND_YES_NO | 6 | a yes or no command, drawn as a command |
ICON_KIND_EQUIPMENT_ITEM | 7 | An item's icon without the broken mark, for the equipment view |
ICON_KIND_PATTERN | 8 | one of the other icons |
Definition at line 59 of file select.h.
SELECTION_RECORD
enum SELECTION_RECORD
The entries of SELECTION_MENU_STATE.records.
| Enumerator | Value | Description |
|---|---|---|
SELECTION_RECORD_ROW | 2 | the first of the row's seven icons |
SELECTION_RECORD_CHOSEN | 9 | the first of the five icons chosen |
SELECTION_RECORD_HAND | 14 | the pointing hand |
SELECTION_RECORD_LARGE_ICON | 15 | |
SELECTION_RECORD_COUNT | 16 |
Definition at line 72 of file select.h.