1#include "TextComponent.h"
15 TypeDatabase::createType<VerticalAlignment>().setEnumerators(vEnumerators);
18 {
"Left", HorizontalAlignment::Left },
19 {
"Right", HorizontalAlignment::Right },
20 {
"Center", HorizontalAlignment::Center },
23 TypeDatabase::createType<HorizontalAlignment>().setEnumerators(hEnumerators);
31 TypeDatabase::createType<HorizontalJustification>().setEnumerators(hjEumerators);
44 TypeDatabase::createType<TextComponent>().setBase<Component>().setFields(fields);
std::vector< glm::vec3 > positions
Offset positions for each of the strings in texts.
HorizontalJustification horizontalJustification
Horizontal justification of the text.
VerticalAlignment verticalAlignment
Vertical alignment of the text.
std::vector< std::string > texts
A set of text strings to render.
static void registerType()
Register the type in the type system.
PositionMode positionMode
Positioning mode of the text.
std::vector< glm::vec4 > colors
Colors for individual strings in text.
glm::vec4 color
Single color value to apply to all text strings.
FontHandle fontHandle
Handle to the font resource to use when rendering text.
Field definition describing a single data member of a data structure.
@ None
None, the text is centered on the position.
@ Right
The rightmost character is placed to the left of the screen position.
@ Left
The leftmost character is placed to the right of the screen position.
@ Bottom
Align the text towards the bottom, making the position minus the font height the baseline of the text...
@ Center
Center the text on the screen position.
@ Top
Align the text towards the top, making the position the baseline of the text.
Contains reflection support.
Represents an unique name.