15 return " " + std::string(
label);
21 .
color = { 1.F, 1.F, 1.F, 1.F },
22 .background = background,
23 .render_bounds = dims,
30 std::string_view
label,
33 const std::shared_ptr<Buffers::FormaBuffer>& batch)
38 surface.
render_config({ .additional_textures = { {
"text", nullptr } } })));
40 auto row = std::make_shared<Element>();
41 row->with_name(std::string(
label))
46 return { surface.add(*row), row };
52 const std::shared_ptr<Element>& row,
53 std::string_view
label,
54 const std::shared_ptr<glm::uvec2>& dims)
58 surface.
ctx().
on_enter(
id, [row, caption, dims](uint32_t) {
61 surface.
ctx().
on_leave(
id, [row, caption, dims](uint32_t) {
void on_enter(uint32_t id, EnterFn fn)
Called once when the cursor enters an element's region.
void on_leave(uint32_t id, LeaveFn fn)
Called once when the cursor leaves an element's region.
Axis-aligned bounding rectangle in a 2D coordinate space.
glm::vec4 color
RGBA color applied to all glyphs not covered by a span in spans.
Construction parameters for press().