Table of Contents
Extensions for Buttons
public static class ButtonExt
Inheritance System.Object ButtonExt
Adds an onclick function to a button
public static void AddOnClick(this Button button, BTD_Mod_Helper.Extensions.Function funcToExecute);
button
UnityEngine.UI.Button
funcToExecute
Function()
Removes the onclick function of a button
public static void RemoveOnClickAction(this Button button, int actionIndex);
button
UnityEngine.UI.Button
actionIndex
System.Int32
Sets the onclick function of a button
public static void SetOnClick(this Button button, BTD_Mod_Helper.Extensions.Function funcToExecute);
button
UnityEngine.UI.Button
funcToExecute
Function()
Set the sprite for this button.
public static void SetSprite(this Button button, Sprite sprite, string newSpriteName="");
button
UnityEngine.UI.Button
sprite
UnityEngine.Sprite
Sprite to change to
newSpriteName
System.String
Optionally provide a new name for the sprite