On this page
  1. text
  2. checked
  3. enabled
  4. id
  5. style
  6. on_change
  7. on_hover
  8. on_unhover
  9. on_focus
  10. on_blur
  11. show
  12. shake
  13. hovered
  14. focused
  15. ours

rmp::ui::Checkbox

struct #include <rmp/ui.h> include/rmp/ui.h:1851
struct Checkbox

A checkbox that holds its own value.

text

rmp::Text text

The label beside it

checked

bool checked = false

Its value: ticked or not

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<bool> 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 the frame it 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