An option for a ModHelperPopupMenu
public class ModHelperPopupOption : BTD_Mod_Helper.Api.Components.ModHelperPanel
Inheritance UnityEngine.MonoBehaviour ModHelperComponent ModHelperPanel ModHelperPopupOption
Whether to hide ALL parent menus when this option is pressed
public bool hideAllParentsOnClick;
Whether to hide the parent menu when this option is pressed
public bool hideParentOnClick;
The icon for the option
public ModHelperImage icon;
The parent pop up menu if this is a sub option
public ModHelperPopupMenu parentMenu;
The sub popup menu that this leads to, or null
public ModHelperPopupMenu subMenu;
The label for the option
public ModHelperText text;
The Toggle component for the option
public Toggle toggle;
Adds a submenu to to this option
public BTD_Mod_Helper.Api.Components.ModHelperPopupMenu AddSubMenu(BTD_Mod_Helper.Api.Components.Info info);
info Info
ModHelperPopupMenu
this option
Adds a submenu to to this option
public BTD_Mod_Helper.Api.Components.ModHelperPopupOption AddSubMenu(BTD_Mod_Helper.Api.Components.ModHelperPopupMenu menu);
menu ModHelperPopupMenu
The popup menu to use
ModHelperPopupOption
this option
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);
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
Fixes the submenu position to not be off screen
public void FixSubMenuPosition();
Hides the sub menu for this option, if there is one
public void HideSubMenu();
Sets whether this option is selected
public void SetSelected(bool selected);
selected System.Boolean
Shows the sub menu for this option, if there is one
public void ShowSubMenu();