libgui 3.00
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
GuiTheme.h
1/****************************************************************************
2 * libgui
3 * Daryl Borth 2026
4 * GuiTheme.h
5 *
6 * One place for the colors and metrics a code-drawn UI shares, and ready
7 * made styles built from them (card, panel, button, chip). Platform-agnostic.
8 * Metrics are design-canvas pixels.
9 *
10 * The core defines no look of its own: every value comes from the
11 * application's GuiThemeInit() (see below).
12 ***************************************************************************/
13#pragma once
14#include "GuiPaint.h"
15
86
void GuiThemeInit(GuiTheme &theme)
Fills in every color and metric of the theme.
A set of paints, one per state. States left unset fall back to the normal paint. GuiShapeStyle(rest)....
Definition GuiPaint.h:84
Colors, metrics and the style recipes built from them.
Definition GuiTheme.h:21
GuiShapeStyle cardStyle() const
A raised card: gradient surface, outline, drop shadow; a glowing accent outline when focused.
Definition GuiTheme.cpp:46
int glyphFontSize
Font size of a one-character letter on a glyph, in pixels.
Definition GuiTheme.h:51
uint8_t cardDisabledAlpha
Opacity of a disabled card.
Definition GuiTheme.h:62
float glyphSize
Width and height of a round glyph (face button, D-pad arrow, stick, +, -, home).
Definition GuiTheme.h:48
float padding
Space inside a card.
Definition GuiTheme.h:43
float buttonGlowBlur
Softness of a focused button's glow.
Definition GuiTheme.h:59
PixelColor text
Primary text.
Definition GuiTheme.h:31
PixelColor surface
Panels and resting cards.
Definition GuiTheme.h:24
PixelColor highlight
Selected row or list item (a light tint on a light theme).
Definition GuiTheme.h:36
uint8_t rowPressAlpha
Opacity of a pressed list row's accent tint.
Definition GuiTheme.h:61
PixelColor good
Positive state (connected, charged).
Definition GuiTheme.h:35
GuiShapeStyle panelStyle() const
A quiet container: flat surface with a thin outline.
Definition GuiTheme.cpp:41
float buttonStrokeLight
How far (0..1) a focused or pressed button's outline is lightened toward white.
Definition GuiTheme.h:64
PixelColor outline
Quiet outlines.
Definition GuiTheme.h:26
uint8_t focusGlowAlpha
Peak opacity of a focused card's glow.
Definition GuiTheme.h:57
uint8_t pressGlowAlpha
Peak opacity of a pressed card's glow.
Definition GuiTheme.h:58
GuiShapeStyle chipStyle() const
A small label background (a "chip")
Definition GuiTheme.cpp:85
static GuiTheme & current()
The theme the rest of the library reads. The first call fills it in with GuiThemeInit().
Definition GuiTheme.cpp:35
float glowGrow
How much wider (blur and spread) a focused card's glow is than its shadow.
Definition GuiTheme.h:56
PixelColor accentLight
Light end of the focused-button gradient.
Definition GuiTheme.h:29
PixelColor textInverse
Ink drawn over a text-colored fill (the letter or symbol on a glyph badge).
Definition GuiTheme.h:34
PixelColor accent
Highlight: focus outline, focused button.
Definition GuiTheme.h:28
int glyphFontSizeSmall
Font size of a longer letter on a glyph ("ZL", "ZR").
Definition GuiTheme.h:52
float spacing
Gap between siblings.
Definition GuiTheme.h:44
float barDarken
How far (0..1) a bar's fill is darkened from the background toward black.
Definition GuiTheme.h:65
PixelColor shadow
Drop shadow of a resting card; its alpha is the peak opacity.
Definition GuiTheme.h:38
float strokeWidth
Outline width.
Definition GuiTheme.h:42
PixelColor textMuted
Secondary text.
Definition GuiTheme.h:32
GuiShapeStyle buttonStyle() const
A capsule or rounded button: lights up in the accent color when focused, darkens when pressed.
Definition GuiTheme.cpp:66
PixelColor outlineStrong
Resting button outline and fill.
Definition GuiTheme.h:27
PixelColor surfaceRaised
Lighter end of a card's gradient, chips.
Definition GuiTheme.h:25
GuiShapeStyle barStyle() const
A dark strip for a hint or status bar.
Definition GuiTheme.cpp:97
GuiTheme()
Every field zero. Nothing here is a look: GuiThemeInit() provides it.
Definition GuiTheme.cpp:23
float radius
Corner radius of cards and panels.
Definition GuiTheme.h:41
uint8_t buttonDisabledAlpha
Opacity of a disabled button.
Definition GuiTheme.h:63
PixelColor accentDark
Pressed-button fill.
Definition GuiTheme.h:30
float glyphBumperHeight
Height of a bumper glyph.
Definition GuiTheme.h:50
GuiShapeStyle rowStyle() const
A flat list row: invisible at rest, a gray bar when focused, tinted when pressed.
Definition GuiTheme.cpp:90
PixelColor background
Screen background.
Definition GuiTheme.h:23
PixelColor mark
What is being edited or pointed at (a control on a controller picture and the line to it).
Definition GuiTheme.h:37
uint8_t buttonGlowAlpha
Peak opacity of a focused button's glow.
Definition GuiTheme.h:60
float shadowOffsetY
How far a resting card's shadow falls.
Definition GuiTheme.h:55
float glyphBumperWidth
Width of a bumper glyph (L, R, ZL, ZR).
Definition GuiTheme.h:49
float shadowBlur
Softness of a resting card's shadow.
Definition GuiTheme.h:45
PixelColor textOnAccent
Text drawn over the accent color.
Definition GuiTheme.h:33
8-bit-per-channel RGBA color used by the video interfaces.
Definition Mesh.h:16