Table of Contents
ModHelperComponent for a
public class ModHelperDropdown : BTD_Mod_Helper.Api.Components.ModHelperComponent
Inheritance UnityEngine.MonoBehaviour ModHelperComponent ModHelperDropdown
The Arrow image
public BTD_Mod_Helper.Api.Components.ModHelperImage Arrow { get; }
The Image being displayed
public Image Background { get; }
The component which handles the dropdown
public TMP_Dropdown Dropdown { get; }
The default item in the template
public BTD_Mod_Helper.Api.Components.ModHelperPanel TemplateItem { get; }
The template object for the window of the dropdown
public BTD_Mod_Helper.Api.Components.ModHelperScrollPanel TemplatePanel { get; }
The Text which shows the currently selected value
public BTD_Mod_Helper.Api.Components.ModHelperText Text { get; }
Creates a new ModHelperDropdown
public static BTD_Mod_Helper.Api.Components.ModHelperDropdown Create(BTD_Mod_Helper.Api.Components.Info info, List<string> options, float windowHeight, UnityAction<int> onValueChanged, string background=null, float labelFontSize=42f);
info
Info
The name/position/size info. NOTE: width/height must be set to actual values
options
Il2CppSystem.Collections.Generic.List
The list of options
windowHeight
System.Single
Height of the created dropdown window
onValueChanged
UnityEngine.Events.UnityAction
Action that should happen when an option of the given index is selected
background
System.String
The background image
labelFontSize
System.Single
Text size of label
ModHelperDropdown
The created ModHelperDropdown