subscreenpage#

Variables#

Functions#

subscreenwidget

GetWidget(char32[] label)

subscreenwidget

CreateWidget(int type)

void

SwapWidgets(int index1, int index2)

subscreenwidget

FindWidget(int cursor_pos)

int

SelectorMove(int cursor_pos, int dir, int flags)

void

Delete()

Variable descriptions#

const int Index ๐Ÿ”— Source

The index of this page within the subscreen.


const int NumWidgets ๐Ÿ”— Source

The number of widgets on the page.


const subscreenwidget[] Widgets ๐Ÿ”— Source

The widgets on the page, ordered by their index.


const subscreendata SubData ๐Ÿ”— Source

The subscreendata that owns this page.


int CursorPos ๐Ÿ”— Source

The position value of the selector.


Function descriptions#

subscreenwidget GetWidget(char32[] label) ๐Ÿ”— Source

Returns the first widget with a matching label, or NULL if none exists.


subscreenwidget CreateWidget(int type) ๐Ÿ”— Source

Adds a new widget of the specified type to the end of the page.

Returns that widget, or NULL if fails.


void SwapWidgets(int index1, int index2) ๐Ÿ”— Source

Swaps the widgets at the two indexes.


subscreenwidget FindWidget(int cursor_pos) ๐Ÿ”— Source

Returns the widget designated by the specified cursor position, or NULL if it fails.


int SelectorMove(int cursor_pos, int dir, int flags) ๐Ÿ”— Source

Returns the new cursor position found by moving in โ€˜dirโ€™ from โ€˜cursor_posโ€™.

โ€˜flagsโ€™ determines:

  • SUBSEL_FLAG_NO_NONEQUIP: Skip widgets that are โ€œNon-equippableโ€

  • SUBSEL_FLAG_NEED_ITEM: Skip widgets that currently have no equippable item


void Delete() ๐Ÿ”— Source

Deletes the page.

If it is the last page, an empty page will be created in itsโ€™ place.