Endstar LUA API Documentation
Loading...
Searching...
No Matches
Text Class Reference

Allows the display and updating of 3D text in the game world. Much of this is a wrapper for Unity's TextMeshPro! More...

Public Member Functions

void SetColor (Context instigator, Color color)
 Sets the color of the text. Alpha is ignored, see SetAlpha.
 
void SetAlpha (Context instigator, float alpha)
 Sets the transparency of the text color.
 
void SetCharacterSpacing (Context instigator, float spacing)
 How much additional spacing should be between the characters?
 
void SetLineSpacing (Context instigator, float spacing)
 How much spacing should be between the lines of text?
 
void DisplayText (Context instigator, bool display)
 Hides or un-hides the text.
 
void SetFontSize (Context instigator, float fontSize)
 Sets the current font size. Only has effect if Auto-sizing is not enabled.
 
void SetAutoSizingEnabled (Context instigator, bool useAutoSizing)
 Changes if this text auto-sizes based on text length.
 
void SetAutoSizingMinimum (Context instigator, float minimum)
 If this text auto-sizes, what is the minimum font size it can scale to?
 
void SetAutoSizingMaximum (Context instigator, float maximum)
 If this text auto-sizes, what is the maximum font size it can scale to?
 
void SetLocalizedText (Context instigator, LocalizedString text)
 Updates the displayed 3D text with a text localized to each player!
 
void SetRawText (Context instigator, string text)
 Sets the text to a direct string, will not support localization.
 

Detailed Description

Allows the display and updating of 3D text in the game world. Much of this is a wrapper for Unity's TextMeshPro!

Member Function Documentation

◆ DisplayText()

void DisplayText ( Context instigator,
bool display )

Hides or un-hides the text.

Parameters
instigatorThe source context that is triggering this change
displayTrue to display it, false to hide it!

◆ SetAlpha()

void SetAlpha ( Context instigator,
float alpha )

Sets the transparency of the text color.

Parameters
instigatorThe source context that is triggering this change
alpha

◆ SetAutoSizingEnabled()

void SetAutoSizingEnabled ( Context instigator,
bool useAutoSizing )

Changes if this text auto-sizes based on text length.

Parameters
instigatorThe source context that is triggering this change
useAutoSizing

◆ SetAutoSizingMaximum()

void SetAutoSizingMaximum ( Context instigator,
float maximum )

If this text auto-sizes, what is the maximum font size it can scale to?

Parameters
instigatorThe source context that is triggering this change
maximum

◆ SetAutoSizingMinimum()

void SetAutoSizingMinimum ( Context instigator,
float minimum )

If this text auto-sizes, what is the minimum font size it can scale to?

Parameters
instigatorThe source context that is triggering this change
minimum

◆ SetCharacterSpacing()

void SetCharacterSpacing ( Context instigator,
float spacing )

How much additional spacing should be between the characters?

Parameters
instigatorThe source context that is triggering this change
spacing

◆ SetColor()

void SetColor ( Context instigator,
Color color )

Sets the color of the text. Alpha is ignored, see SetAlpha.

Parameters
instigatorThe source context that is triggering this change
color

◆ SetFontSize()

void SetFontSize ( Context instigator,
float fontSize )

Sets the current font size. Only has effect if Auto-sizing is not enabled.

Parameters
instigatorThe source context that is triggering this change
fontSize

◆ SetLineSpacing()

void SetLineSpacing ( Context instigator,
float spacing )

How much spacing should be between the lines of text?

Parameters
instigatorThe source context that is triggering this change
spacing

◆ SetLocalizedText()

void SetLocalizedText ( Context instigator,
LocalizedString text )

Updates the displayed 3D text with a text localized to each player!

Parameters
instigatorThe source context that is triggering this change
textThe localized text available

◆ SetRawText()

void SetRawText ( Context instigator,
string text )

Sets the text to a direct string, will not support localization.

Parameters
instigatorThe source context that is triggering this change
textThe new text to display