Loading...
Searching...
No Matches
ModalTheme.h
Go to the documentation of this file.
1#ifndef MALENA_MODALTHEME_H
2#define MALENA_MODALTHEME_H
3
4#pragma once
5
8
9namespace ml
10{
12 {
22
23 ModalTheme& applyFrom(const Theme& t) override
24 {
27 std::max(0, t.surface.r - 6),
28 std::max(0, t.surface.g - 6),
29 std::max(0, t.surface.b - 6));
36 return *this;
37 }
38
40 { static_cast<ControlTheme&>(*this) = c; return *this; }
41
43 void setPanelColor(const sf::Color& c) { panelColor = c; }
47 void setConfirmColor(const sf::Color& c) { confirmColor = c; }
48 void setCancelColor(const sf::Color& c) { cancelColor = c; }
49 void setBtnTextColor(const sf::Color& c) { btnTextColor = c; }
51 };
52
53} // namespace ml
54
55#endif // MALENA_MODALTHEME_H
static const Color White
std::uint8_t b
std::uint8_t g
std::uint8_t r
Definition Component.h:22
Theme tokens for interactive UI controls.
ControlTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
sf::Color backdropColor
Definition ModalTheme.h:13
sf::Color bodyTextColor
Definition ModalTheme.h:16
void setConfirmColor(const sf::Color &c)
Definition ModalTheme.h:47
void setSeparatorColor(const sf::Color &c)
Definition ModalTheme.h:46
void setCancelColor(const sf::Color &c)
Definition ModalTheme.h:48
void setBtnTextColor(const sf::Color &c)
Definition ModalTheme.h:49
void setPanelColor(const sf::Color &c)
Definition ModalTheme.h:43
sf::Color panelColor
Definition ModalTheme.h:14
sf::Color separatorColor
Definition ModalTheme.h:17
sf::Color titleTextColor
Definition ModalTheme.h:15
sf::Color btnTextColor
Definition ModalTheme.h:20
sf::Color confirmColor
Definition ModalTheme.h:18
void setCloseBtnColor(const sf::Color &c)
Definition ModalTheme.h:50
void setTitleTextColor(const sf::Color &c)
Definition ModalTheme.h:44
void setBodyTextColor(const sf::Color &c)
Definition ModalTheme.h:45
sf::Color cancelColor
Definition ModalTheme.h:19
ModalTheme & applyFrom(const Theme &t) override
Populate all fields from the global Theme token set.
Definition ModalTheme.h:23
ModalTheme & operator=(const ControlTheme &c)
Definition ModalTheme.h:39
sf::Color closeBtnColor
Definition ModalTheme.h:21
void setBackdropColor(const sf::Color &c)
Definition ModalTheme.h:42
Universal design token set applied across all Themeable components.
Definition Theme.h:70
sf::Color border
Definition Theme.h:98
sf::Color onPrimary
Definition Theme.h:89
sf::Color primary
Definition Theme.h:74
sf::Color onSurface
Definition Theme.h:86
sf::Color muted
Definition Theme.h:95
sf::Color surface
Definition Theme.h:80