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

Represents a mod menu entry. More...

#include <baseMod_c.h>

Data Fields

const char * Label
 Primary label.
int32_t * Value
 Real value behind the setting.
int32_t MinValue
 Minimum value. Should almost always be 0. Inclusive.
int32_t MaxValue
 Maximum value for Number Line and maximum index for value labels (i.e. ValueLabel size - 1).
const char ** ValueLabels
 A list of labels to assign to each value.
BM_MenuAction Command
 Optional command callback when entry is selected and pressed.
BM_ValueChangeCallback ValueChanged
 Optional value changed callback. Can be used to update other values based on the entry Value.

Detailed Description

Represents a mod menu entry.

Entries can display in 3 different modes depending on which values are defined in this struct.

  • Command:
    • Definition: Value is null, ValueLabels is null, and Command is defined
    • Behavior: Only display label, execute command when selected.
  • Gauge:
    • Definition: Value is defined and ValueLabels is null
    • Behavior: Set a value on a gauge (e.g. Training Menu->Life Bar)
  • Enum:
    • Definition: Value and ValueLabels are defined
    • Behavior: Select a value (e.g. Training Menu->Display)

Number Line and Enum Value type entries may also have a command function.

Field Documentation

◆ Label

const char* BaseMod_ModMenuEntry::Label

Primary label.

Drawn via the RenderMenuText native function. see BaseMod_NativeFunctionsApi::RenderMenuText for format and character restrictions.

◆ MaxValue

int32_t BaseMod_ModMenuEntry::MaxValue

Maximum value for Number Line and maximum index for value labels (i.e. ValueLabel size - 1).

Inclusive. Getting this value wrong can cause crashes!

◆ MinValue

int32_t BaseMod_ModMenuEntry::MinValue

Minimum value. Should almost always be 0. Inclusive.

Gauge setting UI assumes minimum is 0. Other values may display strangely.

◆ Value

int32_t* BaseMod_ModMenuEntry::Value

Real value behind the setting.

This value will be read and written to.

◆ ValueLabels

const char** BaseMod_ModMenuEntry::ValueLabels

A list of labels to assign to each value.

Value labels are drawn via the RenderCockpitFontText internal function. String format and character restrictions apply. see BaseMod_NativeFunctionsApi::RenderCockpitFontText for details.


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