Skip to Main Content

BTD_Mod_Helper​.Api​.Components​.ModHelperPopupOption


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Components

ModHelperPopupOption Class

An option for a ModHelperPopupMenu

public class ModHelperPopupOption : BTD_Mod_Helper.Api.Components.ModHelperPanel

Inheritance UnityEngine.MonoBehaviourModHelperComponentModHelperPanel  ModHelperPopupOption

Fields

ModHelperPopupOption.hideAllParentsOnClick Field

Whether to hide ALL parent menus when this option is pressed

public bool hideAllParentsOnClick;

Field Value

System.Boolean

ModHelperPopupOption.hideParentOnClick Field

Whether to hide the parent menu when this option is pressed

public bool hideParentOnClick;

Field Value

System.Boolean

ModHelperPopupOption.icon Field

The icon for the option

public ModHelperImage icon;

Field Value

ModHelperImage

ModHelperPopupOption.parentMenu Field

The parent pop up menu if this is a sub option

public ModHelperPopupMenu parentMenu;

Field Value

ModHelperPopupMenu

ModHelperPopupOption.subMenu Field

The sub popup menu that this leads to, or null

public ModHelperPopupMenu subMenu;

Field Value

ModHelperPopupMenu

ModHelperPopupOption.text Field

The label for the option

public ModHelperText text;

Field Value

ModHelperText

ModHelperPopupOption.toggle Field

The Toggle component for the option

public Toggle toggle;

Field Value

UnityEngine.UI.Toggle

Methods

ModHelperPopupOption.AddSubMenu(Info) Method

Adds a submenu to to this option

public BTD_Mod_Helper.Api.Components.ModHelperPopupMenu AddSubMenu(BTD_Mod_Helper.Api.Components.Info info);

Parameters

info Info

Returns

ModHelperPopupMenu
this option

ModHelperPopupOption.AddSubMenu(ModHelperPopupMenu) Method

Adds a submenu to to this option

public BTD_Mod_Helper.Api.Components.ModHelperPopupOption AddSubMenu(BTD_Mod_Helper.Api.Components.ModHelperPopupMenu menu);

Parameters

menu ModHelperPopupMenu

The popup menu to use

Returns

ModHelperPopupOption
this option

ModHelperPopupOption.Create(Info, string, string, UnityAction, ModHelperPopupMenu, Func, Func) Method

Constructs a new option for a popupmenu

public static BTD_Mod_Helper.Api.Components.ModHelperPopupOption Create(BTD_Mod_Helper.Api.Components.Info info, string text=null, string icon=null, UnityAction action=null, BTD_Mod_Helper.Api.Components.ModHelperPopupMenu subMenu=null, Func<bool> isSelected=null, Func<bool> isHidden=null);

Parameters

info Info

The info to use for its size, if no Height is set, 75 will be used

text System.String

Option label, if null then uses the Name from the info

icon System.String

Option icon, null for no icon, empty string for still creating the icon but it being empty

action UnityEngine.Events.UnityAction

Action to perform when this option is clicked

subMenu ModHelperPopupMenu

Sub menu that this option opens

isSelected Il2CppSystem.Func

Function to determine if this option should display as selected or not

isHidden Il2CppSystem.Func

Function to determine if this option should be visible or should be hidden

Returns

ModHelperPopupOption

ModHelperPopupOption.FixSubMenuPosition() Method

Fixes the submenu position to not be off screen

public void FixSubMenuPosition();

ModHelperPopupOption.HideSubMenu() Method

Hides the sub menu for this option, if there is one

public void HideSubMenu();

ModHelperPopupOption.SetSelected(bool) Method

Sets whether this option is selected

public void SetSelected(bool selected);

Parameters

selected System.Boolean

ModHelperPopupOption.ShowSubMenu() Method

Shows the sub menu for this option, if there is one

public void ShowSubMenu();
To learn how to download BTD Mod Helper and install mods, click here