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

Add options to mod menu. More...

#include <baseMod_c.h>

Data Fields

uint32_t size
 The size of the struct in bytes.
uint32_t version
 the API version.
const BaseMod_ModMenu_HelperFunctionsApiHelperFunctions
 A collection of helper functions for implementing your own custom menu handler.
const BaseMod_MenuDimensions *BASEMOD_CALL(* GetDrawableAreaDimensions )()
 Gets a pointer to a struct defining the bounds of the drawable menu area.
uint32_t BASEMOD_CALL(* RegisterMenuTab )(const char *title, const BaseMod_ModMenuEntry *entries, uint32_t numEntries)
 Registers a menu tab definition with the mod menu.
uint32_t BASEMOD_CALL(* RegisterCustomMenuTab )(const char *title, BM_CustomMenuHandler handler)
 Registers a custom menu handler function.

Detailed Description

Add options to mod menu.

Field Documentation

◆ GetDrawableAreaDimensions

const BaseMod_MenuDimensions *BASEMOD_CALL(* BaseMod_ModMenuApi::GetDrawableAreaDimensions) ()

Gets a pointer to a struct defining the bounds of the drawable menu area.

Use these dimensions to future proof BM_CustomMenuHandler implementations.

◆ RegisterCustomMenuTab

uint32_t BASEMOD_CALL(* BaseMod_ModMenuApi::RegisterCustomMenuTab) (const char *title, BM_CustomMenuHandler handler)

Registers a custom menu handler function.

Parameters
titleTab name. Character limitations are similar to BaseMod_NativeFunctionsApi::RenderCockpitFontText
handlerCustom menu handler function invoked by the Mod Menu Manager. This callback is invoked after the Mod Menu handles fiber switching, tab switching, and exiting the menu, so there is no need to implement that functionality in this callback. It's recommended to use the dimensions from GetDrawableAreaDimensions to future proof your implementation. See the HelperFunctions sub API and Refer to the source code at source/baseMod/modMenu/modMenu.cpp::ModMenu() for help implementing your own handler.

◆ RegisterMenuTab

uint32_t BASEMOD_CALL(* BaseMod_ModMenuApi::RegisterMenuTab) (const char *title, const BaseMod_ModMenuEntry *entries, uint32_t numEntries)

Registers a menu tab definition with the mod menu.

Parameters
titleTab name. Character limitations are similar to BaseMod_NativeFunctionsApi::RenderCockpitFontText
entriesAn array of BaseMod_ModMenuEntry structures comprising the menu definition. See BaseMod_ModMenuEntry. Callers must maintain the lifetime of values in the declaration.
Returns
0 if no error, else an error code.

◆ version

uint32_t BaseMod_ModMenuApi::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: