On this page
  1. text
  2. color
  3. size
  4. wrap
  5. id
  6. style
  7. on_click
  8. on_hover
  9. on_unhover
  10. show
  11. shake
  12. hovered
  13. ours

rmp::ui::Label

struct #include <rmp/ui.h> include/rmp/ui.h:1774
struct Label

Text, as text() draws it, with a style of its own: a title in another font, with an outline. Clickable when it has an on_click.

text

rmp::Text text

What it says

color

ColorRole color = ColorRole::TEXT

Used when the style sets no text colour

size

detail::Sizing size{}

A step or design units, as TextOptions::size

wrap

bool wrap = true

Break between words to fit; false = never broken

id

std::string id{}

As ButtonOptions::id: for a shared label

style

Style style{}

Its own look; see Style

on_click

rmp::Callback<> on_click

Clicked: released on it, or Enter or A with the focus

on_hover

rmp::Callback<> on_hover

The pointer arrived on it

on_unhover

rmp::Callback<> on_unhover

...and left

show

bool show()

True on the frame it was clicked

shake

void shake()

Shakes it, as Button::shake() does

hovered

bool hovered() const

The pointer is on it

ours

KeptState ours

What it remembers; read it with the methods above