rmp::ui::Panel
A container: a panel with a look of its own (style), and a look for everything inside it (children), which every descendant inherits — the nearest container's wins. Clickable as a whole when it has an on_click: an inventory slot, a card.
rmp::ui::Panel shop{
.style = { .background = DARKBROWN, .shadow = rmp::ui::Shadow{} },
.children = { .text = GOLD, .font = title_font },
};
shop.show([&] { buy.show(); sell.show(); });row
Children left to right; false = top to bottom
box
Its layout, as panel() takes it
background
False: a bare row or column, which still styles its children
id
As ButtonOptions::id: for a shared label
style
Its own look; see Style
children
The look of everything inside it
on_click
Clicked: released on it, or Enter or A with the focus
on_hover
The pointer arrived on it
on_unhover
...and left
on_press
The pointer went down on it
on_release
...and came up
show, shake, hovered, pressed
Lays it out with body inside it; true on the frame it was clicked.
show: Lays it out here
shake: Shakes it, as Button::shake() does
hovered: The pointer is on it
pressed: Held down on it
ours
What it remembers; read it with the methods above