On this page
  1. picture
  2. sprite
  3. grow
  4. width
  5. height
  6. enabled
  7. id
  8. style
  9. on_click
  10. on_hover
  11. on_unhover
  12. on_press
  13. on_release
  14. show
  15. shake
  16. hovered
  17. pressed
  18. ours

rmp::ui::Image

struct #include <rmp/ui.h> include/rmp/ui.h:1794
struct Image

A picture with a style — a frame, a shadow — that can be clicked. With a sprite that has a sheet, it plays the sprite's animation: sprite.play("idle").

picture

Picture picture{}

What it shows, unless sprite has something

sprite

rmp::Sprite sprite{}

An animated picture, advanced every show()

grow

bool grow = false

As ImageOptions

width

float width = 0

> 0 = fixed, in design units

height

float height = 0

> 0 = fixed, in design units

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{}

Tint, skin behind it, shadow, border

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

on_press

rmp::Callback<> on_press

The pointer went down on it

on_release

rmp::Callback<> on_release

...and came up

show

bool show()

Lays it out here; 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

pressed

bool pressed() const

Held down on it

ours

KeptState ours

What it remembers; read it with the methods above