Text drawn within its element's rect, on as many lines as it breaks into.
More...
#include <ui_text.h>
|
|
std::string | text |
| | UTF-8; what the font does not cover draws nothing.
|
|
std::string | font = DEFAULT_UI_FONT |
| | Baked SDF font asset name; nothing draws if unresolved.
|
|
float | pixelSize = 32.0f |
| | Text height in canvas reference pixels.
|
|
glm::vec4 | color = {1.0f, 1.0f, 1.0f, 1.0f} |
| | Straight (non-premultiplied) RGBA.
|
|
Align | align = Align::Left |
| | Horizontal alignment within the element rect.
|
|
VAlign | valign = VAlign::Top |
| | Vertical alignment within the element rect.
|
|
bool | wrap = false |
| | Whether a line too wide for the element rect breaks onto the next.
|
Text drawn within its element's rect, on as many lines as it breaks into.
The font is a name, not a handle, because a name is what a scene file can hold; it is resolved through ResourceManager::findByName each frame. Text taller than the rect overflows unless an ancestor clips (clipChildren, or a UIScroll).
The documentation for this struct was generated from the following file: