Skip to Main Content

BTD_Mod_Helper​.Api​.Components​.ModHelperText


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Components

ModHelperText Class

ModHelperComponent for a background panel

public class ModHelperText : BTD_Mod_Helper.Api.Components.ModHelperComponent

Inheritance UnityEngine.MonoBehaviourModHelperComponent  ModHelperText

Properties

ModHelperText.SizingWidthToText Property

Makes the width of this object scale with the text its holding

public bool SizingWidthToText { get; set; }

Property Value

System.Boolean

ModHelperText.Text Property

The component that handles the Text rendering

public NK_TextMeshProUGUI Text { get; }

Property Value

Il2Cpp.NK_TextMeshProUGUI

Methods

ModHelperText.Create(Info, string, float, TextAlignmentOptions) Method

Creates a new ModHelperText

public static BTD_Mod_Helper.Api.Components.ModHelperText Create(BTD_Mod_Helper.Api.Components.Info info, string text, float fontSize=42f, TextAlignmentOptions align=4098);

Parameters

info Info

The name/position/size info

text System.String

The text to display

fontSize System.Single

Size of font

align Il2CppTMPro.TextAlignmentOptions

Alignment of text

Returns

ModHelperText
The created ModHelperText

ModHelperText.EnableAutoSizing() Method

Enables auto sizing for this Text component

public void EnableAutoSizing();

ModHelperText.EnableAutoSizing(bool) Method

Enables or disables auto sizing for this Text component

public void EnableAutoSizing(bool enable);

Parameters

enable System.Boolean

ModHelperText.EnableAutoSizing(float, float) Method

Enables auto sizing for Text

public void EnableAutoSizing(float fontSizeMax, float fontSizeMin);

Parameters

fontSizeMax System.Single

fontSizeMin System.Single

ModHelperText.EnableAutoSizing(float) Method

Enables auto sizing for this Text component

public void EnableAutoSizing(float fontSizeMax);

Parameters

fontSizeMax System.Single

ModHelperText.OnUpdate() Method

Unity Component OnUpdate

protected override void OnUpdate();

ModHelperText.SetText(string) Method

Sets the text of this text to the given text

public void SetText(string text);

Parameters

text System.String

ModHelperText.SizeWidthToText(bool) Method

Makes the width of this object scale with the text its holding

public void SizeWidthToText(bool sizeWidthToText=true);

Parameters

sizeWidthToText System.Boolean

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