GearBlocks
The GearBlocks Lua scripting API
Properties | List of all members
SmashHammer.UI.ILabel Interface Reference

Provides access to a UI label's properties. More...

Inheritance diagram for SmashHammer.UI.ILabel:
SmashHammer.UI.ButtonText SmashHammer.UI.Label SmashHammer.UI.LabelledDropdown SmashHammer.UI.LabelledInputField SmashHammer.UI.LabelledNumberField SmashHammer.UI.LabelledSlider SmashHammer.UI.LabelledToggle

Properties

string Text [get, set]
 The label text.
 
Color32Proxy Colour [get, set]
 The text colour.
 
FontStyle FontStyle [get, set]
 The font style.
 
int FontSize [get, set]
 The font size.
 
float LineSpacing [get, set]
 The line spacing.
 
TextAnchor Alignment [get, set]
 The text alignment.
 
float PreferredWidth [get]
 The preferred width.
 
float PreferredHeight [get]
 The preferred height.
 

Detailed Description

Provides access to a UI label's properties.

Property Documentation

◆ Text

string SmashHammer.UI.ILabel.Text
getset

The label text.

The text shown by this label.

Implemented in SmashHammer.UI.Label.

◆ Colour

Color32Proxy SmashHammer.UI.ILabel.Colour
getset

The text colour.

The colour applied to this label's text.

◆ FontStyle

FontStyle SmashHammer.UI.ILabel.FontStyle
getset

The font style.

The font style used for this label's text.

FontStyle enum:

Normal No special style is applied. Available in Lua as fontStyle_Normal.
Bold Bold style applied to your texts. Available in Lua as fontStyle_Bold.
Italic Italic style applied to your texts. Available in Lua as fontStyle_Italic.
BoldAndItalic Bold and Italic styles applied to your texts. Available in Lua as fontStyle_BoldAndItalic.

◆ FontSize

int SmashHammer.UI.ILabel.FontSize
getset

The font size.

The font size used for this label's text.

◆ LineSpacing

float SmashHammer.UI.ILabel.LineSpacing
getset

The line spacing.

The line spacing used for this label's text.

◆ Alignment

TextAnchor SmashHammer.UI.ILabel.Alignment
getset

The text alignment.

The alignment used for this label's text.

TextAnchor enum:

UpperLeft Text is anchored in upper left corner. Available in Lua as textAnc_UpperLeft.
UpperCenter Text is anchored in upper side, centered horizontally. Available in Lua as textAnc_UpperCenter.
UpperRight Text is anchored in upper right corner. Available in Lua as textAnc_UpperRight.
MiddleLeft Text is anchored in left side, centered vertically. Available in Lua as textAnc_MiddleLeft.
MiddleCenter Text is centered both horizontally and vertically. Available in Lua as textAnc_MiddleCenter.
MiddleRight Text is anchored in right side, centered vertically. Available in Lua as textAnc_MiddleRight.
LowerLeft Text is anchored in lower left corner. Available in Lua as textAnc_LowerLeft.
LowerCenter Text is anchored in lower side, centered horizontally. Available in Lua as textAnc_LowerCenter.
LowerRight Text is anchored in lower right corner. Available in Lua as textAnc_LowerRight.

◆ PreferredWidth

float SmashHammer.UI.ILabel.PreferredWidth
get

The preferred width.

The preferred width of this UI element.

◆ PreferredHeight

float SmashHammer.UI.ILabel.PreferredHeight
get

The preferred height.

The preferred height of this UI element.