Skip to Main Content

BTD_Mod_Helper​.Api​.Components​.ModHelperButton


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Components

ModHelperButton Class

ModHelperComponent for a background panel

public class ModHelperButton : BTD_Mod_Helper.Api.Components.ModHelperComponent

Inheritance UnityEngine.MonoBehaviourModHelperComponent  ModHelperButton

Fields

ModHelperButton.LongBtnRatio Field

The aspect ratio of LongBtn sprites, since they aren't sliced for some reason lol

public const float LongBtnRatio = 2.81;

Field Value

System.Single

Properties

ModHelperButton.Button Property

The actual button component

public Button Button { get; }

Property Value

UnityEngine.UI.Button

ModHelperButton.Image Property

The displayed image of the button

public Image Image { get; }

Property Value

UnityEngine.UI.Image

Methods

ModHelperButton.Create(Info, string, Action) Method

Creates a new ModHelperButton

public static BTD_Mod_Helper.Api.Components.ModHelperButton Create(BTD_Mod_Helper.Api.Components.Info info, string sprite, Action onClick);

Parameters

info Info

The name/position/size info

sprite System.String

The button's visuals

onClick Il2CppSystem.Action

What should happen when the button is clicked

Returns

ModHelperButton

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