GearLoader 1.1.0
Mod loader for GGXXACPR
Loading...
Searching...
No Matches
BaseMod_ModMenu_HelperFunctionsApi Struct Reference

Data Fields

uint32_t size
 The size of the struct in bytes.
uint32_t version
 the API version.
int32_t BASEMOD_CALL(* SelectionHandler )(int32_t currentSelection, uint32_t totalEntries)
 Handles updating the current menu selection.
int32_t BASEMOD_CALL(* HoldDirectionInputHandler )(uint32_t input)
 Handles input repeating for held direction inputs.
void BASEMOD_CALL(* DrawEnumSettingUI )(const char *label, int32_t xOffset, int32_t y, int32_t isSelected)
 Draws the enum setting UI.
void BASEMOD_CALL(* DrawGaugeSettingUI )(int32_t currentValue, int32_t y, int32_t isSelected, int32_t maxValue)
 Draws the gauge setting UI.
void BASEMOD_CALL(* DrawScrollArrow )(int32_t flags)
 Draws one or both of the menu scroll arrows.
void BASEMOD_CALL(* SwitchToMainFiber )()
 Yields control back to the main fiber. Use this to pause BM_CustomMenuHandler execution until the next frame. Useful for sub-menus.

Field Documentation

◆ DrawEnumSettingUI

void BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::DrawEnumSettingUI) (const char *label, int32_t xOffset, int32_t y, int32_t isSelected)

Draws the enum setting UI.

Parameters
labelLabel 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.
xOffsetOffset from the default x position. Internal resolution screen-space coordinates.
yInternal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480.
isSelectedA 4-byte boolean that determines transparency. Opaque if param is non-zero, semi-transparent if zero.

◆ DrawGaugeSettingUI

void BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::DrawGaugeSettingUI) (int32_t currentValue, int32_t y, int32_t isSelected, int32_t maxValue)

Draws the gauge setting UI.

The native function invoked here has a hard-coded x position.

Parameters
currentValueValue to display on the gauge.
yInternal resolution screen-space coordinate (640x480). Top edge is 0, bottom is 480.
isSelectedA 4-byte boolean that determines transparency. Opaque if param is non-zero, semi-transparent if zero.
maxValueMaximum value the gauge should display.

◆ DrawScrollArrow

void BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::DrawScrollArrow) (int32_t flags)

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
flagssee enum BM_DrawScrollArrowFlags

◆ HoldDirectionInputHandler

int32_t BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::HoldDirectionInputHandler) (uint32_t input)

Handles input repeating for held direction inputs.

Uses this for left/right inputs in the menu or custom selection handling.

Parameters
inputsee enum GGXXACPR_RawControllerInput

◆ SelectionHandler

int32_t BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::SelectionHandler) (int32_t currentSelection, uint32_t totalEntries)

Handles updating the current menu selection.

Updates selection based on player input and implements hold-repeat functionality identically to native menus.

Parameters
currentSelectionThe selection value. 0 is the top menu item.
totalEntriesNumber of entries in the current menu (i.e. maximum value + 1). Needed for selection wrapping.

◆ SwitchToMainFiber

void BASEMOD_CALL(* BaseMod_ModMenu_HelperFunctionsApi::SwitchToMainFiber) ()

Yields control back to the main fiber. Use this to pause BM_CustomMenuHandler execution until the next frame. Useful for sub-menus.

See doc on Plus R's Fibers.

◆ version

uint32_t BaseMod_ModMenu_HelperFunctionsApi::version

the API version.

The mod loader will create this struct with the value given by the BASEMOD_API_VERSION_NUM macro. Compare this value with the BASEMOD_API_VERSION_NUM macro to detect version differences between the installed mod loader version and the targeted mod loader API version. The format is a semantic version 0x00AABBCC where 0xAA is major, 0xBB is minor, and 0xCC is patch number.


The documentation for this struct was generated from the following file: