rmp::ui::Dropdown
struct Dropdown
A dropdown that holds its items and its choice.
text
rmp::Text text
The label beside it
items
std::vector<rmp::Text> items
The choices, in order
selected
int selected = 0
The index of the one chosen
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<int> on_change
The new index
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 the frame selected 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