Theme tokens for interactive UI controls.
More...
#include <Malena/Traits/Theme/ControlTheme.h>
Inherits ml::GraphicTheme.
Inherited by ml::CheckboxTheme, ml::InputTheme, ml::ListItemTheme, ml::ListTheme, ml::MenuBarTheme, ml::RadioButtonTheme, ml::SideMenuTheme, ml::SplitPanelTheme, ml::TabbedPanelTheme, ml::ToggleTheme, and ml::ToolbarTheme.
|
| sf::Color | disabledColor = sf::Color(60, 60, 60) |
| sf::Color | disabledTextColor = sf::Color(120, 120, 120) |
| sf::Color | errorColor = sf::Color(220, 70, 70) |
| sf::Color | fillColor = sf::Color(40, 40, 40) |
| sf::Color | focusColor = sf::Color(100, 60, 200) |
| const sf::Font * | font = &FontManager<>::getDefault() |
| unsigned int | fontSize = 14 |
| unsigned int | fontSizeSmall = 11 |
| sf::Color | hoverColor = sf::Color(70, 130, 230) |
| sf::Color | mutedColor = sf::Color(120, 120, 120) |
| sf::Color | outlineColor = sf::Color(100, 100, 100) |
| float | outlineThickness = 1.5f |
| float | padding = 8.f |
| float | radius = 8.f |
| sf::Color | textColor = sf::Color::White |
Theme tokens for interactive UI controls.
Extends GraphicTheme with tokens for hover, focus, disabled, and text states. All controls — toggles, buttons, checkboxes, etc. — use ControlTheme or a subclass.
- See also
- GraphicTheme, ToggleTheme
Definition at line 28 of file ControlTheme.h.
◆ applyFrom()
Populate all fields from the global Theme token set.
Subclasses call GraphicTheme::applyFrom(t) first, then apply their own token mappings.
Reimplemented from ml::GraphicTheme.
Reimplemented in ml::InputTheme, ml::ListItemStyle, ml::ListItemTheme, ml::ListStyle, ml::ListTheme, ml::MenuBarStyle, ml::MenuBarTheme, ml::PillStyle, ml::PillTheme, ml::RadioButtonStyle, ml::RadioButtonTheme, ml::RadioGroupStyle, ml::RadioGroupTheme, ml::SegmentStyle, ml::SegmentTheme, ml::SelectStyle, ml::SelectTheme, ml::SideMenuStyle, ml::SideMenuTheme, ml::SplitPanelStyle, ml::SplitPanelTheme, ml::TabbedPanelStyle, ml::TabbedPanelTheme, ml::TextAreaStyle, ml::TextInputStyle, ml::TextInputTheme, ml::ToggleTheme, ml::ToolbarStyle, and ml::ToolbarTheme.
Definition at line 45 of file ControlTheme.h.
◆ getDisabledColor()
| sf::Color ml::ControlTheme::getDisabledColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getDisabledTextColor()
| sf::Color ml::ControlTheme::getDisabledTextColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getErrorColor()
| sf::Color ml::ControlTheme::getErrorColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFillColor()
| sf::Color ml::GraphicTheme::getFillColor |
( |
| ) |
const |
|
inlinenodiscardinherited |
◆ getFocusColor()
| sf::Color ml::ControlTheme::getFocusColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFont()
| const sf::Font * ml::ControlTheme::getFont |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFontSize()
| unsigned int ml::ControlTheme::getFontSize |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFontSizeSmall()
| unsigned int ml::ControlTheme::getFontSizeSmall |
( |
| ) |
const |
|
inlinenodiscard |
◆ getHoverColor()
| sf::Color ml::ControlTheme::getHoverColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getMutedColor()
| sf::Color ml::ControlTheme::getMutedColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ getOutlineColor()
| sf::Color ml::GraphicTheme::getOutlineColor |
( |
| ) |
const |
|
inlinenodiscardinherited |
◆ getOutlineThickness()
| float ml::GraphicTheme::getOutlineThickness |
( |
| ) |
const |
|
inlinenodiscardinherited |
◆ getPadding()
| float ml::ControlTheme::getPadding |
( |
| ) |
const |
|
inlinenodiscard |
◆ getRadius()
| float ml::GraphicTheme::getRadius |
( |
| ) |
const |
|
inlinenodiscardinherited |
◆ getTextColor()
| sf::Color ml::ControlTheme::getTextColor |
( |
| ) |
const |
|
inlinenodiscard |
◆ operator=()
◆ setDisabledColor()
| void ml::ControlTheme::setDisabledColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setDisabledTextColor()
| void ml::ControlTheme::setDisabledTextColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setErrorColor()
| void ml::ControlTheme::setErrorColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setFillColor()
| void ml::GraphicTheme::setFillColor |
( |
const sf::Color & | c | ) |
|
|
inlineinherited |
◆ setFocusColor()
| void ml::ControlTheme::setFocusColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setFont() [1/2]
| void ml::ControlTheme::setFont |
( |
const sf::Font && | | ) |
|
|
delete |
◆ setFont() [2/2]
| void ml::ControlTheme::setFont |
( |
const sf::Font & | f | ) |
|
|
inline |
◆ setFontSize()
| void ml::ControlTheme::setFontSize |
( |
unsigned int | s | ) |
|
|
inline |
◆ setFontSizeSmall()
| void ml::ControlTheme::setFontSizeSmall |
( |
unsigned int | s | ) |
|
|
inline |
◆ setHoverColor()
| void ml::ControlTheme::setHoverColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setMutedColor()
| void ml::ControlTheme::setMutedColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ setOutlineColor()
| void ml::GraphicTheme::setOutlineColor |
( |
const sf::Color & | c | ) |
|
|
inlineinherited |
◆ setOutlineThickness()
| void ml::GraphicTheme::setOutlineThickness |
( |
float | t | ) |
|
|
inlineinherited |
◆ setPadding()
| void ml::ControlTheme::setPadding |
( |
float | p | ) |
|
|
inline |
◆ setRadius()
| void ml::GraphicTheme::setRadius |
( |
float | r | ) |
|
|
inlineinherited |
◆ setTextColor()
| void ml::ControlTheme::setTextColor |
( |
const sf::Color & | c | ) |
|
|
inline |
◆ disabledColor
◆ disabledTextColor
◆ errorColor
◆ fillColor
◆ focusColor
◆ font
◆ fontSize
| unsigned int ml::ControlTheme::fontSize = 14 |
◆ fontSizeSmall
| unsigned int ml::ControlTheme::fontSizeSmall = 11 |
◆ hoverColor
◆ mutedColor
◆ outlineColor
◆ outlineThickness
| float ml::GraphicTheme::outlineThickness = 1.5f |
|
inherited |
◆ padding
| float ml::ControlTheme::padding = 8.f |
◆ radius
| float ml::GraphicTheme::radius = 8.f |
|
inherited |
◆ textColor
The documentation for this struct was generated from the following file: