◆ ModMenuApi() [1/2]
| BaseMod::ModMenuApi::ModMenuApi |
( |
| ) |
|
|
inline |
709 :
710 ApiWrapper(),
711 HelperFunctions() { }
◆ ModMenuApi() [2/2]
712 :
713 ApiWrapper(ref),
◆ GetDrawableAreaDimensions()
Get's a pointer to a struct defining the bounds of the drawable menu area.
Use these dimensions to future proof BM_CustomMenuHandler implementations.
723 {
724 auto dim = _ref->GetDrawableAreaDimensions();
725 return {dim->left, dim->top, dim->right, dim->bottom};
726 }
◆ RegisterCustomMenuTab()
| uint32_t BaseMod::ModMenuApi::RegisterCustomMenuTab |
( |
const char * | title, |
|
|
CustomMenuHandler | handler ) |
|
inline |
Registers a custom menu handler function.
- Parameters
-
| title | Tab name. Character limitations are similar to BaseMod_NativeFunctionsApi::RenderCockpitFontText |
| handler | Custom 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 recommend to use the dimensions from GetDrawableAreaDimensions to future proof your implementation. Refer to the source code at source/baseMod/modMenu/modMenu.cpp::ModMenu() for an example of implementing your own handler. |
748 {
749 return _ref->RegisterCustomMenuTab(title, handler);
750 }
◆ RegisterMenuTab()
| uint32_t BaseMod::ModMenuApi::RegisterMenuTab |
( |
const char * | title, |
|
|
const ModMenuEntry * | entries, |
|
|
uint32_t | numEntries ) |
|
inline |
Registers a menu tab definition with the mod menu.
- Parameters
-
- Returns
- 0 if no error, else an error code.
735 {
736 return _ref->RegisterMenuTab(title, entries, numEntries);
737 }
The documentation for this class was generated from the following file: