7 std::shared_ptr<Buffers::FormaBuffer> make_text_buffer(Surface& surface)
10 surface.render_config({ .additional_textures = { {
"text", nullptr } } }));
18 std::shared_ptr<Portal::Text::PressParams> params,
19 std::string initial_text,
24 make_text_buffer(surface), surface, bounds, std::move(params), std::move(initial_text));
27 const auto batch = make_text_buffer(surface);
28 auto viewport_target = FormaTarget::slice_of(batch, Graphics::PrimitiveTopology::TRIANGLE_STRIP);
29 auto viewport =
Scrollable {}.
place(std::move(viewport_target), surface, bounds);
32 FormaTarget::slice_of(batch, Graphics::PrimitiveTopology::TRIANGLE_LIST),
33 surface, viewport, std::move(params), std::move(initial_text));
Axis-aligned bounding rectangle in a 2D coordinate space.
MAYAFLUX_API TextField & place(FormaTarget in_buf, Surface &surface, Kinesis::AABB2D bounds, std::shared_ptr< Portal::Text::PressParams > in_params, std::string initial_text={})
Register the text field element and wire text editing onto it.
MAYAFLUX_API TextField & scrollable(FormaTarget in_buf, Surface &surface, Scrollable &scroller, std::shared_ptr< Portal::Text::PressParams > in_params, std::string initial_text={}, float content_multiplier=3.F)
Fluent creator: place this field inside an already-placed Scrollable, growing itself taller than its ...
An editable text region: keyboard/text-input wiring over an Element the caller already has a buffer f...