libgui 3.00
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
GuiTheme Struct Reference

Colors, metrics and the style recipes built from them. More...

#include <GuiTheme.h>

Public Member Functions

 GuiTheme ()
 Every field zero. Nothing here is a look: GuiThemeInit() provides it.
 
GuiShapeStyle panelStyle () const
 A quiet container: flat surface with a thin outline.
 
GuiShapeStyle cardStyle () const
 A raised card: gradient surface, outline, drop shadow; a glowing accent outline when focused.
 
GuiShapeStyle buttonStyle () const
 A capsule or rounded button: lights up in the accent color when focused, darkens when pressed.
 
GuiShapeStyle chipStyle () const
 A small label background (a "chip")
 
GuiShapeStyle rowStyle () const
 A flat list row: invisible at rest, a gray bar when focused, tinted when pressed.
 
GuiShapeStyle barStyle () const
 A dark strip for a hint or status bar.
 

Static Public Member Functions

static GuiTheme & current ()
 The theme the rest of the library reads. The first call fills it in with GuiThemeInit().
 

Public Attributes

PixelColor background
 Screen background.
 
PixelColor surface
 Panels and resting cards.
 
PixelColor surfaceRaised
 Lighter end of a card's gradient, chips.
 
PixelColor outline
 Quiet outlines.
 
PixelColor outlineStrong
 Resting button outline and fill.
 
PixelColor accent
 Highlight: focus outline, focused button.
 
PixelColor accentLight
 Light end of the focused-button gradient.
 
PixelColor accentDark
 Pressed-button fill.
 
PixelColor text
 Primary text.
 
PixelColor textMuted
 Secondary text.
 
PixelColor textOnAccent
 Text drawn over the accent color.
 
PixelColor textInverse
 Ink drawn over a text-colored fill (the letter or symbol on a glyph badge).
 
PixelColor good
 Positive state (connected, charged).
 
PixelColor highlight
 Selected row or list item (a light tint on a light theme).
 
PixelColor mark
 What is being edited or pointed at (a control on a controller picture and the line to it).
 
PixelColor shadow
 Drop shadow of a resting card; its alpha is the peak opacity.
 
float radius
 Corner radius of cards and panels.
 
float strokeWidth
 Outline width.
 
float padding
 Space inside a card.
 
float spacing
 Gap between siblings.
 
float shadowBlur
 Softness of a resting card's shadow.
 
float glyphSize
 Width and height of a round glyph (face button, D-pad arrow, stick, +, -, home).
 
float glyphBumperWidth
 Width of a bumper glyph (L, R, ZL, ZR).
 
float glyphBumperHeight
 Height of a bumper glyph.
 
int glyphFontSize
 Font size of a one-character letter on a glyph, in pixels.
 
int glyphFontSizeSmall
 Font size of a longer letter on a glyph ("ZL", "ZR").
 
float shadowOffsetY
 How far a resting card's shadow falls.
 
float glowGrow
 How much wider (blur and spread) a focused card's glow is than its shadow.
 
uint8_t focusGlowAlpha
 Peak opacity of a focused card's glow.
 
uint8_t pressGlowAlpha
 Peak opacity of a pressed card's glow.
 
float buttonGlowBlur
 Softness of a focused button's glow.
 
uint8_t buttonGlowAlpha
 Peak opacity of a focused button's glow.
 
uint8_t rowPressAlpha
 Opacity of a pressed list row's accent tint.
 
uint8_t cardDisabledAlpha
 Opacity of a disabled card.
 
uint8_t buttonDisabledAlpha
 Opacity of a disabled button.
 
float buttonStrokeLight
 How far (0..1) a focused or pressed button's outline is lightened toward white.
 
float barDarken
 How far (0..1) a bar's fill is darkened from the background toward black.
 

Detailed Description

Colors, metrics and the style recipes built from them.

Change a value on GuiTheme::current() and every shape styled afterwards follows. The values are set by the application's GuiThemeInit(); a GuiTheme made any other way starts with every field zero.

Definition at line 21 of file GuiTheme.h.

Constructor & Destructor Documentation

◆ GuiTheme()

GuiTheme::GuiTheme ( )

Every field zero. Nothing here is a look: GuiThemeInit() provides it.

Definition at line 23 of file GuiTheme.cpp.

Member Function Documentation

◆ barStyle()

GuiShapeStyle GuiTheme::barStyle ( ) const

A dark strip for a hint or status bar.

Definition at line 97 of file GuiTheme.cpp.

◆ buttonStyle()

GuiShapeStyle GuiTheme::buttonStyle ( ) const

A capsule or rounded button: lights up in the accent color when focused, darkens when pressed.

Definition at line 66 of file GuiTheme.cpp.

◆ cardStyle()

GuiShapeStyle GuiTheme::cardStyle ( ) const

A raised card: gradient surface, outline, drop shadow; a glowing accent outline when focused.

Definition at line 46 of file GuiTheme.cpp.

◆ chipStyle()

GuiShapeStyle GuiTheme::chipStyle ( ) const

A small label background (a "chip")

Definition at line 85 of file GuiTheme.cpp.

◆ current()

GuiTheme & GuiTheme::current ( )
static

The theme the rest of the library reads. The first call fills it in with GuiThemeInit().

Definition at line 35 of file GuiTheme.cpp.

◆ panelStyle()

GuiShapeStyle GuiTheme::panelStyle ( ) const

A quiet container: flat surface with a thin outline.

Definition at line 41 of file GuiTheme.cpp.

◆ rowStyle()

GuiShapeStyle GuiTheme::rowStyle ( ) const

A flat list row: invisible at rest, a gray bar when focused, tinted when pressed.

Definition at line 90 of file GuiTheme.cpp.

Member Data Documentation

◆ accent

PixelColor GuiTheme::accent

Highlight: focus outline, focused button.

Definition at line 28 of file GuiTheme.h.

◆ accentDark

PixelColor GuiTheme::accentDark

Pressed-button fill.

Definition at line 30 of file GuiTheme.h.

◆ accentLight

PixelColor GuiTheme::accentLight

Light end of the focused-button gradient.

Definition at line 29 of file GuiTheme.h.

◆ background

PixelColor GuiTheme::background

Screen background.

Definition at line 23 of file GuiTheme.h.

◆ barDarken

float GuiTheme::barDarken

How far (0..1) a bar's fill is darkened from the background toward black.

Definition at line 65 of file GuiTheme.h.

◆ buttonDisabledAlpha

uint8_t GuiTheme::buttonDisabledAlpha

Opacity of a disabled button.

Definition at line 63 of file GuiTheme.h.

◆ buttonGlowAlpha

uint8_t GuiTheme::buttonGlowAlpha

Peak opacity of a focused button's glow.

Definition at line 60 of file GuiTheme.h.

◆ buttonGlowBlur

float GuiTheme::buttonGlowBlur

Softness of a focused button's glow.

Definition at line 59 of file GuiTheme.h.

◆ buttonStrokeLight

float GuiTheme::buttonStrokeLight

How far (0..1) a focused or pressed button's outline is lightened toward white.

Definition at line 64 of file GuiTheme.h.

◆ cardDisabledAlpha

uint8_t GuiTheme::cardDisabledAlpha

Opacity of a disabled card.

Definition at line 62 of file GuiTheme.h.

◆ focusGlowAlpha

uint8_t GuiTheme::focusGlowAlpha

Peak opacity of a focused card's glow.

Definition at line 57 of file GuiTheme.h.

◆ glowGrow

float GuiTheme::glowGrow

How much wider (blur and spread) a focused card's glow is than its shadow.

Definition at line 56 of file GuiTheme.h.

◆ glyphBumperHeight

float GuiTheme::glyphBumperHeight

Height of a bumper glyph.

Definition at line 50 of file GuiTheme.h.

◆ glyphBumperWidth

float GuiTheme::glyphBumperWidth

Width of a bumper glyph (L, R, ZL, ZR).

Definition at line 49 of file GuiTheme.h.

◆ glyphFontSize

int GuiTheme::glyphFontSize

Font size of a one-character letter on a glyph, in pixels.

Definition at line 51 of file GuiTheme.h.

◆ glyphFontSizeSmall

int GuiTheme::glyphFontSizeSmall

Font size of a longer letter on a glyph ("ZL", "ZR").

Definition at line 52 of file GuiTheme.h.

◆ glyphSize

float GuiTheme::glyphSize

Width and height of a round glyph (face button, D-pad arrow, stick, +, -, home).

Definition at line 48 of file GuiTheme.h.

◆ good

PixelColor GuiTheme::good

Positive state (connected, charged).

Definition at line 35 of file GuiTheme.h.

◆ highlight

PixelColor GuiTheme::highlight

Selected row or list item (a light tint on a light theme).

Definition at line 36 of file GuiTheme.h.

◆ mark

PixelColor GuiTheme::mark

What is being edited or pointed at (a control on a controller picture and the line to it).

Definition at line 37 of file GuiTheme.h.

◆ outline

PixelColor GuiTheme::outline

Quiet outlines.

Definition at line 26 of file GuiTheme.h.

◆ outlineStrong

PixelColor GuiTheme::outlineStrong

Resting button outline and fill.

Definition at line 27 of file GuiTheme.h.

◆ padding

float GuiTheme::padding

Space inside a card.

Definition at line 43 of file GuiTheme.h.

◆ pressGlowAlpha

uint8_t GuiTheme::pressGlowAlpha

Peak opacity of a pressed card's glow.

Definition at line 58 of file GuiTheme.h.

◆ radius

float GuiTheme::radius

Corner radius of cards and panels.

Definition at line 41 of file GuiTheme.h.

◆ rowPressAlpha

uint8_t GuiTheme::rowPressAlpha

Opacity of a pressed list row's accent tint.

Definition at line 61 of file GuiTheme.h.

◆ shadow

PixelColor GuiTheme::shadow

Drop shadow of a resting card; its alpha is the peak opacity.

Definition at line 38 of file GuiTheme.h.

◆ shadowBlur

float GuiTheme::shadowBlur

Softness of a resting card's shadow.

Definition at line 45 of file GuiTheme.h.

◆ shadowOffsetY

float GuiTheme::shadowOffsetY

How far a resting card's shadow falls.

Definition at line 55 of file GuiTheme.h.

◆ spacing

float GuiTheme::spacing

Gap between siblings.

Definition at line 44 of file GuiTheme.h.

◆ strokeWidth

float GuiTheme::strokeWidth

Outline width.

Definition at line 42 of file GuiTheme.h.

◆ surface

PixelColor GuiTheme::surface

Panels and resting cards.

Definition at line 24 of file GuiTheme.h.

◆ surfaceRaised

PixelColor GuiTheme::surfaceRaised

Lighter end of a card's gradient, chips.

Definition at line 25 of file GuiTheme.h.

◆ text

PixelColor GuiTheme::text

Primary text.

Definition at line 31 of file GuiTheme.h.

◆ textInverse

PixelColor GuiTheme::textInverse

Ink drawn over a text-colored fill (the letter or symbol on a glyph badge).

Definition at line 34 of file GuiTheme.h.

◆ textMuted

PixelColor GuiTheme::textMuted

Secondary text.

Definition at line 32 of file GuiTheme.h.

◆ textOnAccent

PixelColor GuiTheme::textOnAccent

Text drawn over the accent color.

Definition at line 33 of file GuiTheme.h.


The documentation for this struct was generated from the following files: