A widget that can render a text string.
Inheritance:
Set the font asset.
Sig: Text:SetFont(font)
- Arg:
Font font
Font asset
Get the font asset.
Sig: font = Text:GetFont()
- Ret:
Font font
Font asset
Set the text size.
Sig: Text:SetTextSize(size)
- Arg:
number size
Text size
Get the text size.
Sig: size = Text:GetTextSize()
- Ret:
number size
Text size
Get the scaled text size (as a result of the Widget scale).
Sig: size = Text:GetScaledTextSize()
- Ret:
number size
Scaled text size
Set the text string.
Sig: Text:SetText(text)
- Arg:
string text
Text string
Get the text string.
Sig: text = Text:GetText()
- Ret:
string text
Text string
Get the width in screen pixels of the constructed font vertices. Useful for alignment and checking the actual area of the text (versus the widget Rect).
Sig: width = Text:GetTextWidth()
- Ret:
number
Text width in pixels
Get the height in screen pixels of the constructed font vertices. Useful for alignment and checking the actual area of the text (versus the widget Rect).
Sig: height = Text:GetTextHeight()
- Ret:
number
Text height in pixels
Get the scaled minimum extent of text vertices. NOTE: Does not handle text justification correctly yet.
Sig: minExt = Text:GetScaledMinExtent()
- Ret:
Vector minExt
Minimum extent in screen space
Get the scaled maximum extent of text vertices. NOTE: Does not handle text justification correctly yet.
Sig: maxExt = Text:GetScaledMaxExtent()
- Ret:
Vector maxExt
Maximum extent in screen space
Set the horizontal justification.
See Justification
Sig: Text:SetHorizontalJustification(just)
- Arg:
Justification(integer) just
Text justification
Get the horizontal justification.
See Justification
Sig: just = Text:GetHorizontalJustification()
- Ret:
Justification(integer) just
Text justification
Set the vertical justification.
See Justification
Sig: Text:SetVerticalJustification(just)
- Arg:
Justification(integer) just
Text justification
Get the vertical justification.
See Justification
Sig: just = Text:GetVerticalJustification()
- Ret:
Justification(integer) just
Text justification
Enable word wrap. Word wrap will put characters on a new line after they pass the dimensions of this widget's rect.
Sig: Text:EnableWordWrap(wrap)
- Arg:
boolean wrap
Word wrap
Check if word wrap is enabled. Word wrap will put characters on a new line after they pass the dimensions of this widget's rect.
Sig: wrap = Text:IsWordWrapEnabled()
- Ret:
boolean wrap
Word wrap