Component that lets an Entity be used to render 2D or 3D text.
- Reflectible
- Serializable (POD)
- Processed by graphics systems (such as the OpenGLSystem)
using string = putils::string<KENGINE_FONT_PATH_MAX_LENGTH>;
string text;
string font;
size_t fontSize;The text to be displayed, and the font it should be displayed in.
The maximum length of these fields (stored as putils::strings) defaults to 128, and can be adjusted by defining the KENGINE_FONT_PATH_MAX_LENGTH macro.
putils::NormalizedColor color;Color in which the text should be displayed. Stored as a putils::NormalizedColor.
enum class Alignment {
Left,
Center,
Right
};
Alignment alignment = Alignment::Center;