Label
Generated from engine/render/label.h at 862e08b. The text under each declaration is the header's own comment, word for word. About the reference says how these pages are made.
#include "engine/render/label.h" · namespace labrador
class Label
Section titled “class Label”A string a scene can hold, which is what Text on its own is not.
Text is the drawing half - a wide string, a font handle, a measurement and a draw(). What it does not have is the three things engine/core/game_object.h asks for: something to step, an extent to cull against, and the GameObject base that lets a container hold it next to a sprite.
It is a separate class rather than a base added to Text, and that is not a style choice: engine/ui pairs a GameObject-derived UiWidget with the drawable (UiText is UiWidget plus Text), so a GameObject base on Text would give UiText two of them. This is the same pairing Visual already is for sprites - GameObject plus TextureObject - and for the same reason.
Label(const std::wstring& text, const std::string& font_name, float scale = 1.0f, float rotation = 0.0f, float layer_depth = 0.0f);update
Section titled “update”void update(float dt) override;Nothing to step. A label that animates is a label something else moves, which is what set_position is for.
One declaration overriding two virtuals, because GameObject::draw and TextObject::draw have the same signature in unrelated bases - without it, this class is abstract and the call is ambiguous.
bounds
Section titled “bounds”The drawn box: TextObject::text_bounds, which scales and turns the stored measurement at the current scale and rotation. The measurement is taken when the string or the font changes and not here: this is the culling path, and measuring walks the string. A scale or rotation change takes no measurement and needs none.
Related types
Section titled “Related types”Named in the public declarations above: Colour, DrawList, GameObject, RectangleF, RenderResources, Text, 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/audio/audio_state.hsamples/linesweeper/states/play_state.hsamples/minimal/states/hello_state.htests/render/label_tests.cpptests/scene/cull_tests.cpp
Development documentation (unreleased). Built from Labrador 862e08b of 2026-10-08.