Skip to Content
The Alchemy Project

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.

Declared in select.h.

Fields

NameDescription
SELECTION_NODErecords [SELECTION_RECORD_COUNT]0 and 1 the arrows at the row's ends, 2 to 8 the row's icons, 9 to 13 the icons chosen so far, 14 the pointing hand and 15 the large icon.
AFFINE_TRANSFORMtransformA zooming icon's scale.
SELECTION_NODE *headThe first icon of the row.
SELECTION_NODE *pathThe icons chosen so far.
WINDOW *windowThe window naming the chosen entry.
Uint16kinds [16]The listed entries, up to 16.
Uint16bases [16]
Uint16count
Uint16baseXScreen pixels.
Uint16baseYScreen pixels.
Uint16unreadCleared with the list and on each step down; nothing reads it.
Uint16topThe first listed entry shown.
Uint16cursorIndexThe entry under the hand, from top; SELECTION_CURSOR_RESET asks the next list to start again from its first entry.
Uint16verticalScrollPixels added to the icons' y; 32 at setup.
Uint16statusSELECTION_STATUS_SCROLLING while the cursor steps, SELECTION_STATUS_SHOWN after (window_selection.c); each tick drawn adds 1.
Uint16pathTop [5]top, kept for each icon chosen on the path.
Uint16pathCursor [5]cursorIndex, kept for each icon chosen on the path.
Uint16locked999 from setup and once a yes or no window opens, 1 from mnRunSelectionForValue.
Uint8unused [42]No code names it.

Description

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.

struct SELECTION_MENU_STATE

Referenced by mnClearBattleHighlight(), mnConfirmSelection(), mnMoveSelectionBackward(), mnMoveSelectionForward(), mnRunSelectionForValue(), mnSelectionMenuAddEntry(), mnSelectionMenuBuildEntries(), mnSelectionMenuClear(), mnSelectionMenuClose(), mnSelectionMenuCreate(), mnSelectionMenuDraw(), mnSelectionMenuDrawArrow(), mnSelectionMenuFindFreeIcon(), mnSelectionMenuFreeLargeIcon(), mnSelectionMenuGetCursorNode(), mnSelectionMenuHighlightIcon(), mnSelectionMenuLoadLargeIcon(), mnSelectionMenuOpenNameWindow(), mnSelectionMenuRedrawIcon(), mnSelectionMenuRun(), mnSelectionMenuRunWithSounds(), mnSelectionMenuScroll(), mnSelectionMenuSetPos(), mnSelectionMenuSetupArrow(), mnSelectionMenuStepLeft() and mnSelectionMenuStepRight().

Definition at line 84 of file select.h.

Fields in detail

records

SELECTION_NODE records[SELECTION_RECORD_COUNT]

0 and 1 the arrows at the row's ends, 2 to 8 the row's icons, 9 to 13 the icons chosen so far, 14 the pointing hand and 15 the large icon.

transform

AFFINE_TRANSFORM transform

A zooming icon's scale.

SELECTION_NODE *head

The first icon of the row.

path

SELECTION_NODE *path

The icons chosen so far.

window

WINDOW *window

The window naming the chosen entry.

kinds

Uint16 kinds[16]

The listed entries, up to 16.

bases

Uint16 bases[16]

count

Uint16 count

baseX

Uint16 baseX

Screen pixels.

baseY

Uint16 baseY

Screen pixels.

unread

Uint16 unread

Cleared with the list and on each step down; nothing reads it.

top

Uint16 top

The first listed entry shown.

cursorIndex

Uint16 cursorIndex

The entry under the hand, from top; SELECTION_CURSOR_RESET asks the next list to start again from its first entry.

verticalScroll

Uint16 verticalScroll

Pixels added to the icons' y; 32 at setup.

status

Uint16 status

SELECTION_STATUS_SCROLLING while the cursor steps, SELECTION_STATUS_SHOWN after (window_selection.c); each tick drawn adds 1.

pathTop

Uint16 pathTop[5]

top, kept for each icon chosen on the path.

pathCursor

Uint16 pathCursor[5]

cursorIndex, kept for each icon chosen on the path.

locked

Uint16 locked

999 from setup and once a yes or no window opens, 1 from mnRunSelectionForValue. Nothing sets 0, which would open a yes or no row and its window at the top of the screen.

unused

Uint8 unused[42]

No code names it.