subscreenwidget#
Variables#
const int |
|
const int |
|
const subscreenpage |
|
const int |
|
const int |
|
int |
|
int[] |
|
bool[] |
|
int |
|
int |
|
int |
|
int |
|
const int |
|
const int |
|
const int |
|
const int |
|
bool[] |
|
bool[] |
|
bool[] |
|
bool[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
bool |
|
int |
|
int |
|
int |
|
int |
|
int[] |
|
int[] |
|
int[] |
|
int[] |
|
int[] |
|
int[] |
|
int[] |
|
int[] |
|
int |
|
untyped[] |
|
bool[] |
|
bool[] |
|
int |
|
int |
|
int |
|
int |
|
bool[] |
|
int[] |
|
int[] |
|
int[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int[] |
|
int |
|
int |
|
int |
|
char32 |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
Functions#
void |
GetSelTextOverride(char32[] buf) |
void |
SetSelTextOverride(char32[] str) |
void |
GetLabel(char32[] buf) |
void |
SetLabel(char32[] str) |
void |
GetText(char32[] buf) |
void |
SetText(char32[] str) |
bool |
|
bool |
Enumerations#
SubscreenItemButton ITMBTN_A = 0
SubscreenItemButton ITMBTN_B = 1
SubscreenItemButton ITMBTN_X = 2
SubscreenItemButton ITMBTN_Y = 3
SubscreenItemButton NUM_ITMBTN = 4
ConditionType CONDTY_NONE = 0
ConditionType CONDTY_EQ = 1
==
ConditionType CONDTY_NEQ = 2
!=
ConditionType CONDTY_GREATER = 3
>
ConditionType CONDTY_GREATEREQ = 4
>=
ConditionType CONDTY_LESS = 5
<
ConditionType CONDTY_LESSEQ = 6
<=
ConditionType NUM_CONDTY = 7
Variable descriptions#
value
SubscreenWidgetType (SUBWIDG_)
The widget’s type.
The index of this widget within the page.
const subscreenpage Page 🔗 Source
The page this widget is within.
const int DisplayItem 🔗 Source
The display/equip item ID for the widget.
Reads as -1 if no item exists, the widget is of a type that has no item, etc
The display/equip item ID for the widget.
Reads as -1 if no item exists, the widget is of a type that has no item, etc
The selector position of this flag.
Only used if the widget is selectable (see GenFlags[]).
index
Direction (DIR_)
The 4 directional positions for the selector.
Only used if the widget is selectable (see GenFlags[]).
Flags related to the visibility of the widget.
Use the ‘SUBVISIB_’ constants to access.
The X position of the widget within the subscreen.
Some widget types do not use this.
The Y position of the widget within the subscreen.
Some widget types do not use this.
The width/height of the widget within the subscreen.
This is USUALLY in pixels, but some types use different values! ex. for 2x2 frame, this is in minitiles, so 8 times less than pixels.
Some widget types do not use this.
The width/height of the widget within the subscreen.
This is USUALLY in pixels, but some types use different values! ex. for 2x2 frame, this is in minitiles, so 8 times less than pixels.
Some widget types do not use this.
Gets the display x, in pixels.
The rectangle represented by this is the same as the bounding box shown in the subscreen editor in ZQ.
Gets the display y, in pixels.
The rectangle represented by this is the same as the bounding box shown in the subscreen editor in ZQ.
Gets the display width, in pixels.
The rectangle represented by this is the same as the bounding box shown in the subscreen editor in ZQ.
Gets the display height, in pixels.
The rectangle represented by this is the same as the bounding box shown in the subscreen editor in ZQ.
index
SubscreenWidgetGenFlag (SUBW_GENFL_)
The general flags for subscreen widgets. These are usually applicable regardless of widget type.
The type-specific flags for subscreen widgets.
There is a different set of constants for this for each widget type.
bool[] RequiredOwnedItems 🔗 Source
index
ItemID (I_)
Any items set true here must be owned for the widget to be active/visible.
bool[] RequiredUnownedItems 🔗 Source
index
ItemID (I_)
Any items set true here must NOT be owned for the widget to be active/visible.
value
CounterIndex (CR_)
The counter this widget requires to be active/visible. Must relate to the RequiredCounterValue based on the RequiredCounterCond.
If CR_NONE, no requirement will be checked.
If SUBW_GENFL_REQ_COUNTER_PERC is set, then the percentage this counter is full will be compared
Otherwise, if SUBW_GENFL_REQ_COUNTER_MAX is set, then the max value of this counter will be compared
Otherwise, this counter’s value will be compared
int RequiredCounterCond 🔗 Source
value
ConditionType (CONDTY_)
The counter operation this widget requires to be active/visible. The RequiredCounter must relate to the RequiredCounterValue by this operation. If CONDTY_NONE, no requirement will be checked.
int RequiredCounterValue 🔗 Source
The counter value this widget requires to be active/visible. The RequiredCounter must relate to this value based on the RequiredCounterCond.
value
LevelItemBitflags (LI_)
The Level Items that are required to be owned (or unowned, if SUBW_GENFL_REQ_INVERT_LITEM is set)
int RequiredLItemLevel 🔗 Source
The Level that RequiredLItems are checked for. If set to ‘-1’, uses the current level.
If set to ‘true’, the widget will not be active/visible.
The X/Y/W/H offsets for the selector on this widget, if the selector is overridden (see GenFlags[]).
These values will REPLACE the x/y/w/h that the selector would normally draw to.
The X/Y/W/H offsets for the selector on this widget, if the selector is overridden (see GenFlags[]).
These values will REPLACE the x/y/w/h that the selector would normally draw to.
The X/Y/W/H offsets for the selector on this widget, if the selector is overridden (see GenFlags[]).
These values will REPLACE the x/y/w/h that the selector would normally draw to.
The X/Y/W/H offsets for the selector on this widget, if the selector is overridden (see GenFlags[]).
These values will REPLACE the x/y/w/h that the selector would normally draw to.
The width (in pixels) for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The height (in pixels) for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The tile for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The cset for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
int[] SelectorFlashCSet 🔗 Source
The flashcset for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The animation frames for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The animation speed for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The animation delay for the two selector overrides.
Will be used by the selector on this widget, if the selector is overridden (see GenFlags[]).
The generic script that will run when a specified button is pressed while this widget is selected.
The 8 InitD[] args for the PressScript
bool[] BtnPressScript 🔗 Source
Use InteractButton (INTBTN_) to index this array.
The ‘true’ buttons here, when pressed while this widget is selected, run the press script.
Use InteractButton (INTBTN_) to index this array.
The ‘true’ buttons here, when pressed while this widget is selected, change the current page based on PageMode.
The type of page change that will occur when a specified button is pressed while this widget is selected.
Use the SubscreenPageMode (SUB_PGMODE_) (SUB_PGMODE_
) constants for this value.
The page to change to when using PageMode of ‘SUB_PGMODE_TARG’
The transition type for PageMode transition.
Compare with the ‘TRANS_TY_’ constants.
The transition sfx for PageMode transition.
bool[] PageTransFlags 🔗 Source
The flags for PageMode transition.
Use the ‘TRANSFLAG_’ constants to access these.
The arguments used for PageMode transition.
Use the ‘TRANS_*_ARG_’ constants to access these
The widget’s cset(s).
For SUBWIDG_FRAME,SUBWIDG_MCGUFF,SUBWIDG_TILEBLOCK,SUBWIDG_MINITILE: can use the ‘SUB_CS_’ constants.
SUBWIDG_FRAME - 1 values
SUBWIDG_MCGUFF - 1 values
SUBWIDG_TILEBLOCK - 1 values
SUBWIDG_MINITILE - 1 values
SUBWIDG_MISCGAUGE - 4 values
SUBWIDG_LGAUGE - 4 values
SUBWIDG_MGAUGE - 4 values
The widget’s tile(s).
For SUBWIDG_MINITILE, can use the ‘SUB_SPTILE_’ constant values.
SUBWIDG_FRAME - 1 values
SUBWIDG_MCGUFF - 1 values
SUBWIDG_TILEBLOCK - 1 values
SUBWIDG_MINITILE - 1 values
SUBWIDG_MISCGAUGE - 4 values
SUBWIDG_LGAUGE - 4 values
SUBWIDG_MGAUGE - 4 values
value
Font
The widget’s font.
value
TextAlignment (TF_)
The widget’s text alignment.
value
ShadowType (SHD_)
The widget’s Shadow Type.
The widget’s color index used for Text
The widget’s color index used for Text when the counter is full
The widget’s color index used for Shadows
The widget’s color index used for Shadows when the counter is full
The widget’s color index used for background
The widget’s color index used for background when the counter is full
The widget’s color index used for outline
The widget’s color index used for fill
value
SubscreenItemButton (ITMBTN_)
The item button associated with the widget.
length
SUBWIDG_COUNTER - 3 values, SUBWIDG_MISCGAUGE - 1 value, SUBWIDG_COUNTERPERCBAR - 1 value
value
CounterIndex (CR_)
The counter(s) associated with the widget.
The minimum digits of the widget.
The maximum digits of the widget.
The infinite item of the widget.
The infinite character of the widget.
The index of cost to use for this widget
The widget’s color index used to indicate the Hero
int ColorCompassBlink 🔗 Source
The widget’s color index used to indicate the blinking compass
The widget’s color index used to indicate the off compass
The widget’s color index used to indicate rooms
The itemclass used by the widget (0 <= ItemType < IC_MAXUSABLE)
The item ID used by the widget (-1 <= ItemID < NUM_ITEMDATA)
The frame/piece tile/cset used by the widget.
The frame/piece tile/cset used by the widget.
The frame/piece tile/cset used by the widget.
The frame/piece tile/cset used by the widget.
The widget’s flip value.
The number associated with the widget.
The corner(s) associated with the widget.
SUBWIDG_MINITILE - 1 values
SUBWIDG_LGAUGE - 4 values
SUBWIDG_MGAUGE - 4 values
SUBWIDG_MISCGAUGE - 4 values
The widget’s frames
The widget’s speed
The widget’s delay
The widget’s container number
The widget’s gauge width
The widget’s gauge height
The widgets unit value
The widget’s horizontal spacing
The widget’s vertical spacing
The widget’s grid x
The widget’s grid y
The widget’s animation value
The magic drain rate this widget will be visible at (-1 for any)
The counter amount per “container” for the widget
The widget’s tabsize value
The level items that cause the compass marker to stop blinking
Function descriptions#
void GetSelTextOverride(char32[] buf) 🔗 Source
Gets the selected text override for this widget.
If the buffer provided is too small, it will *automatically be resized to fit*.
void SetSelTextOverride(char32[] str) 🔗 Source
Sets the selected text override for this widget.
A blank string represents no override.
void GetLabel(char32[] buf) 🔗 Source
Gets the label for this widget.
If the buffer provided is too small, it will *automatically be resized to fit*.
void SetLabel(char32[] str) 🔗 Source
Sets the label for this widget.
void GetText(char32[] buf) 🔗 Source
Gets/Sets the text for this widget.
If the buffer provided for GetText() is too small, it will *automatically be resized to fit*.
void SetText(char32[] str) 🔗 Source
Gets/Sets the text for this widget.
If the buffer provided for GetText() is too small, it will *automatically be resized to fit*.
bool CheckConditions() 🔗 Source
Checks the requirements / conditions of this widget. See RequiredOwnedItems[], RequiredUnownedItems[], RequiredCounter, RequiredLItems, ScriptDisabled
Checks that the widget is visible- meaning, it both passes CheckConditions() and VisibleFlags[].