25 enum class Align : uint8_t { Left, Center, Right, Count };
26 enum class VAlign : uint8_t { Top, Middle, Bottom, Count };
34 std::string
font = DEFAULT_UI_FONT;
36 glm::vec4
color = {1.0f, 1.0f, 1.0f, 1.0f};
41 glm::vec4
shadow = {0.0f, 0.0f, 0.0f, 0.0f};
Text drawn within its element's rect, on as many lines as it breaks into.
Definition ui_text.h:24
std::string text
UTF-8; what the font does not cover draws nothing.
Definition ui_text.h:32
std::string font
Baked SDF font asset name; nothing draws if unresolved.
Definition ui_text.h:34
float pixelSize
Text height in canvas reference pixels.
Definition ui_text.h:35
Align align
Horizontal alignment within the element rect.
Definition ui_text.h:37
glm::vec4 color
Straight (non-premultiplied) RGBA.
Definition ui_text.h:36
static constexpr float SHADOW_DROP
How far the shadow falls, down and right, in the text's heights.
Definition ui_text.h:29
bool wrap
Whether a line too wide for the element rect breaks onto the next.
Definition ui_text.h:46