GGUI::GGTokenSet struct

A token given a value for everything one element builds (ui.Tokens, UseProps::Tokens): { "bar-fill", GGColor::Hex(0x4C8DFFFF) }, { "bar-radius", 3.0f }, or another token's value, GGTokenSet::Alias("bar-fill", "danger").

Public types

enum class Kind: uint8_t { Colour, Number, Same }
What it sets the token to.

Public static functions

static auto Alias(std::string_view name, std::string_view same) -> GGTokenSet
Token name is whatever token same is.

Constructors, destructors, conversion operators

GGTokenSet() defaulted
Nothing.
GGTokenSet(std::string_view name, GGColor colour)
Token name is colour.
GGTokenSet(std::string_view name, float number)
Token name is number.

Public variables

std::string Name
the token
Kind Type
what it sets it to
GGColor Colour
Colour.
float Number
Number.
std::string Same
the token it takes its value from

Friends

auto operator==(const GGTokenSet&, const GGTokenSet&) -> bool defaulted
every member equal

Enum documentation

enum class GGUI::GGTokenSet::Kind: uint8_t

What it sets the token to.

Enumerators
Colour

a colour

Number

a number

Same

another token's value