Text
Generated from engine/render/text.h at 0f4f503. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
Audience: game code.
#include "engine/render/text.h" · namespace labrador
class Text
Section titled “class Text”A drawable string, without a scene's GameObject interface. Use Label when a scene should update, draw and cull the string.
const std::string& font_name, float scale = 1.0f, float rotation = 0.0f, float layer_depth = 0.0f);font_name names a loaded font in render_resources, normally Application::render_resources(). That table is borrowed and must outlive this object. An unknown font name throws std::out_of_range.
position locates the text's origin in world coordinates. origin is the offset from the layout's top-left in unscaled font texels; its default zero anchors that corner at position. Glyph bearings can offset the visible ink. scale scales the font's pixels, and rotation is in radians, clockwise on screen.
colour
Section titled “colour”What the string says and what colour it is drawn in, readable by anyone who can set them. A widget built from text - a settings row whose value changes, a focus group's paint - has to be checkable from outside, and without these its tests could only infer the words from the box they measure to.
set_text · set_colour · set_scale · set_position
Section titled “set_text · set_colour · set_scale · set_position”void set_text(const std::wstring& text) override;void set_scale(float scale) override;Related types
Section titled “Related types”Named in the public declarations above: Colour, DrawObject, RenderResources, TextObject, Vector2F.
In the samples and tests
Section titled “In the samples and tests”The files that include this header directly. A file can also reach it through another header.
samples/minimal/states/confirm_state.htests/assets/string_table_text_tests.cpptests/render/label_tests.cpp,text_tests.cpp
Explained in
Section titled “Explained in”Documentation for Labrador v0.3.0. Built from Labrador 0f4f503 of 2026-11-03.