rmp::ui::TextInput
struct TextInput
A text field that holds its own text.
text
rmp::Text text
The label
value
std::string value
What is typed
placeholder
rmp::Text placeholder{}
Shown, muted, while it is empty
max_length
int max_length = 0
In characters; 0 = no limit
width
float width = 0
Of the field, in design units; 0 = fill the space available
enabled
bool enabled = true
False = drawn disabled; no press, no change, no focus
id
std::string id{}
As ButtonOptions::id: for a shared label
style
Style style{}
Its own look; see Style
on_change
rmp::Callback<std::string_view> on_change
The text, after the change
on_hover
rmp::Callback<> on_hover
The pointer arrived on it
on_unhover
rmp::Callback<> on_unhover
...and left
on_focus
rmp::Callback<> on_focus
The keyboard or gamepad focus arrived
on_blur
rmp::Callback<> on_blur
...and left
show
bool show()
True on any frame the text changed
shake
void shake()
Shakes it, as Button::shake() does
hovered
bool hovered() const
The pointer is on it
focused
bool focused() const
It has the focus
ours
KeptState ours
What it remembers; read it with the methods above