20static const PixelColor WHITE = { 255, 255, 255, 255 };
21static const PixelColor BLACK = { 0, 0, 0, 255 };
25 memset(
this, 0,
sizeof(*
this));
37 static GuiTheme& theme = makeCurrent();
48 GuiPaint rest = GuiPaint()
52 GuiPaint lit = GuiPaint()
56 GuiPaint pressed = GuiPaint()
60 GuiPaint off = GuiPaint()
63 return GuiShapeStyle(rest).onFocus(lit).onPress(pressed).onDisable(off);
69 GuiPaint rest = GuiPaint()
72 GuiPaint lit = GuiPaint()
76 GuiPaint pressed = GuiPaint()
79 GuiPaint off = GuiPaint()
82 return GuiShapeStyle(rest).onFocus(lit).onPress(pressed).onDisable(off);
92 GuiPaint lit = GuiPaint().color(
highlight);
94 return GuiShapeStyle(GuiPaint()).onFocus(lit).onPress(pressed);
void GuiThemeInit(GuiTheme &theme)
Fills in every color and metric of the theme.
PixelColor GuiMixColor(PixelColor a, PixelColor b, float t)
Blends two colors per channel (alpha included): t = 0 gives a, t = 1 gives b.
A set of paints, one per state. States left unset fall back to the normal paint. GuiShapeStyle(rest)....
Colors, metrics and the style recipes built from them.
GuiShapeStyle cardStyle() const
A raised card: gradient surface, outline, drop shadow; a glowing accent outline when focused.
uint8_t cardDisabledAlpha
Opacity of a disabled card.
float buttonGlowBlur
Softness of a focused button's glow.
PixelColor surface
Panels and resting cards.
PixelColor highlight
Selected row or list item (a light tint on a light theme).
uint8_t rowPressAlpha
Opacity of a pressed list row's accent tint.
GuiShapeStyle panelStyle() const
A quiet container: flat surface with a thin outline.
float buttonStrokeLight
How far (0..1) a focused or pressed button's outline is lightened toward white.
PixelColor outline
Quiet outlines.
uint8_t focusGlowAlpha
Peak opacity of a focused card's glow.
uint8_t pressGlowAlpha
Peak opacity of a pressed card's glow.
GuiShapeStyle chipStyle() const
A small label background (a "chip")
static GuiTheme & current()
The theme the rest of the library reads. The first call fills it in with GuiThemeInit().
float glowGrow
How much wider (blur and spread) a focused card's glow is than its shadow.
PixelColor accentLight
Light end of the focused-button gradient.
PixelColor accent
Highlight: focus outline, focused button.
float barDarken
How far (0..1) a bar's fill is darkened from the background toward black.
PixelColor shadow
Drop shadow of a resting card; its alpha is the peak opacity.
float strokeWidth
Outline width.
GuiShapeStyle buttonStyle() const
A capsule or rounded button: lights up in the accent color when focused, darkens when pressed.
PixelColor outlineStrong
Resting button outline and fill.
PixelColor surfaceRaised
Lighter end of a card's gradient, chips.
GuiShapeStyle barStyle() const
A dark strip for a hint or status bar.
GuiTheme()
Every field zero. Nothing here is a look: GuiThemeInit() provides it.
uint8_t buttonDisabledAlpha
Opacity of a disabled button.
PixelColor accentDark
Pressed-button fill.
GuiShapeStyle rowStyle() const
A flat list row: invisible at rest, a gray bar when focused, tinted when pressed.
PixelColor background
Screen background.
uint8_t buttonGlowAlpha
Peak opacity of a focused button's glow.
float shadowOffsetY
How far a resting card's shadow falls.
float shadowBlur
Softness of a resting card's shadow.
8-bit-per-channel RGBA color used by the video interfaces.
uint8_t a
Alpha component.