◆ DrawEnumSettingUI()
| void BaseMod::ModMenuHelperFunctionsApi::DrawEnumSettingUI |
( |
const char * | label, |
|
|
int32_t | xOffset, |
|
|
int32_t | y, |
|
|
int32_t | isSelected ) |
|
inline |
Draws the enum setting UI.
- Parameters
-
| label | Label of the current value. This label is drawn via the RenderCockpitFontText internal function. String format and character restrictions apply. see BaseMod::NativeFunctionsApi::RenderCockpitFontText for details. |
| xOffset | Offset from the default x position. Internal resolution screen-space coordinates. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| isSelected | A 4-byte boolean that determines transparency. Opaque if param is non-zero, semi-transparent if zero. |
669 {
670 _ref->DrawEnumSettingUI(label, xOffset, y, isSelected);
671 }
◆ DrawGaugeSettingUI()
| void BaseMod::ModMenuHelperFunctionsApi::DrawGaugeSettingUI |
( |
int32_t | currentValue, |
|
|
int32_t | y, |
|
|
int32_t | isSelected, |
|
|
int32_t | maxValue ) |
|
inline |
Draws the gauge setting UI.
The native function invoked here has a hard-coded x position.
- Parameters
-
| currentValue | Value to display on the gauge. |
| y | Internal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480. |
| isSelected | A 4-byte boolean that determines transparency. Opaque if param is non-zero, semi-transparent if zero. |
| maxValue | Maximum value the gauge should display. |
683 {
684 _ref->DrawGaugeSettingUI(currentValue, y, isSelected, maxValue);
685 }
◆ DrawScrollArrow()
| void BaseMod::ModMenuHelperFunctionsApi::DrawScrollArrow |
( |
DrawScrollArrowFlags | flags | ) |
|
|
inline |
Draws one or both of the menu scroll arrows.
This is the same sprite as the scroll arrows in the training menu but with custom positions.
- Parameters
-
| flags | controls which arrows are drawn. |
693 {
694 _ref->DrawScrollArrow(static_cast<int32_t>(flags));
695 }
◆ HoldDirectionInputHandler()
| bool BaseMod::ModMenuHelperFunctionsApi::HoldDirectionInputHandler |
( |
ggxxacpr::RawControllerInput | input | ) |
|
|
inline |
Handles input repeating for held direction inputs.
Uses this for left/right inputs in the menu or custom selection handling.
- Parameters
-
| input | The direction to check |
- Returns
- true if the input should be processed for a repeat
655 {
656 return _ref->HoldDirectionInputHandler(static_cast<uint32_t>(input));
657 }
◆ SelectionHandler()
| int32_t BaseMod::ModMenuHelperFunctionsApi::SelectionHandler |
( |
int32_t | currentSelection, |
|
|
uint32_t | totalEntries ) |
|
inline |
Handles updating the current menu selection.
Updates selection based on player input and implements hold-repeat functionality identically to native menus.
- Parameters
-
| currentSelection | The selection value. 0 is the top menu item. |
| totalEntries | Number of entries in the current menu (i.e. maximum value + 1). Needed for selection wrapping. |
644 {
645 return _ref->SelectionHandler(currentSelection, totalEntries);
646 }
◆ SwitchToMainFiber()
| void BaseMod::ModMenuHelperFunctionsApi::SwitchToMainFiber |
( |
| ) |
|
|
inline |
Yields control back to the main fiber. Use this to pause BaseMod::CustomMenuHandler execution until the next frame. Useful for sub-menus.
See doc on Fibers.
702 {
703 _ref->SwitchToMainFiber();
704 }
The documentation for this class was generated from the following file: