rmp::ui::Slider
struct Slider
A slider that holds its own value.
text
rmp::Text text
The label beside it
value
float value = 0
Its value, kept from min to max
min
float min = 0
The value at the left end
max
float max = 1
The value at the right end
step
float step = 0
As SliderOptions
width
float width = 0
0 = fill the space available
show_value
bool show_value = true
Draw the position, as a percentage, after the bar
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<float> on_change
The new value
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 that changed it
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