Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.04 KB

File metadata and controls

45 lines (30 loc) · 1.04 KB

Component that lets an Entity be used to render 2D or 3D text.

Specs

Members

text, font, fontSize

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.

color

putils::NormalizedColor color;

Color in which the text should be displayed. Stored as a putils::NormalizedColor.

alignment

enum class Alignment {
    Left,
    Center,
    Right
};

Alignment alignment = Alignment::Center;