Text

Text Object allow you to add either static or dynamic string to a Scene. It can be used in 2d to display dialogs or subtitles, graphical user interface; or in 3d to display interactive information in real time using perspective.

The text basically, act like a regular Object and can be manipulated and parented the same way as any other Object data type; which makes them easy to use and convenient.

See Also

Static Variables


Name Description
object Parent Object where the Texture component is maintained.
texture Current Font Texture connected to the active Text.
size Active width and height of the Text in pixels (based on the size of the connected Font).

Variables


Name Description
string Active string the Text Object is displaying.
justify Controls the alignment of the Text Object pivot.
double_sided Determine if face culling should be turned on (false) or off (true).
display_count The number of characters that should be draw when rendering the active Text.

Functions


Name Description
SetTexture Connect an existing Font Texture Asset to the active Text.
SetMaterial Assign an existing Material to the current Text.
CopyMaterials Copy the current Material settings from a RenderLayer to another.
GetMaterial Retrieve the Material assigned to a specific slot settings.
SetCharOffset Assign an offset on the X and Y axis to a specific character.
SetCharColor Assign a specific RGBA value to a specific character.

Events


Callbacks Description
OnDraw Triggered each time the Text is about to be sent to GPU for drawing.
OnDisplay This callback is activated right after the Text drawcall have been sent to GPU.

Justify


Enumeration of the Text pivot alignment.

  • kLeft: Offset the Text to the left side of the Object pivot.
  • kRight: Offset the Text to the right side of the Object pivot.
  • kCentered: Center the Text around the Object pivot.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA