Skip to Main Content

BTD_Mod_Helper​.Api​.ModGameMenu


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api

ModGameMenu Class

Class for a custom BTD6 menu

public abstract class ModGameMenu : BTD_Mod_Helper.Api.ModContent

Inheritance System.ObjectModContent  ModGameMenu

Derived
ModGameMenu<T>

Properties

ModGameMenu.BaseMenu Property

The string name of the in game menu to copy from

public abstract string BaseMenu { get; }

Property Value

System.String

ModGameMenu.CommonForegroundHeader Property

The text of the Header component that's on many UI screens, might be null

protected NK_TextMeshProUGUI CommonForegroundHeader { get; }

Property Value

Il2Cpp.NK_TextMeshProUGUI

ModGameMenu.GameMenu Property

The current GameMenu

public GameMenu GameMenu { get; set; }

Property Value

Il2CppAssets.Scripts.Unity.Menu.GameMenu

ModGameMenu.IsOpen Property

Whether this Menu is open or not

public bool IsOpen { get; set; }

Property Value

System.Boolean

Methods

ModGameMenu.MenuName() Method

The name NinjaKiwi gave to the menu of the given screen type

protected static string MenuName<T>()
    where T : GameMenu;

Type parameters

T

Returns

System.String

ModGameMenu.OnMenuClosed() Method

Runs right as your custom menu is being closed

public virtual void OnMenuClosed();

ModGameMenu.OnMenuOpened(Object) Method

Runs right as your custom menu is being opened, with the optional data argument that can be passed into
Open<T>(Object, Object)

public abstract bool OnMenuOpened(Object data);

Parameters

data Il2CppSystem.Object

Returns

System.Boolean
Whether to run the base menu's OnOpen code

ModGameMenu.OnMenuUpdate() Method

Runs every time that your custom menu updates

public virtual void OnMenuUpdate();

ModGameMenu.Open(Object, Object) Method

Opens a custom menu

public static void Open<T>(Object data=null, Object baseData=null)
    where T : BTD_Mod_Helper.Api.ModGameMenu;

Type parameters

T

The custom menu type to open

Parameters

data Il2CppSystem.Object

The custom data to pass into your ModGameMenu's OnMenuOpened(Object) method

baseData Il2CppSystem.Object

The data that you want to pass into the base menu's Open method, if you're still running the
code

To learn how to download BTD Mod Helper and install mods, click here