Loading...
Searching...
No Matches
ml::Select Class Reference

A dropdown select control with rich per-item content. More...

#include <Malena/Graphics/Controls/Select.h>

Inheritance diagram for ml::Select:
[legend]

Public Types

using Flag = SelectManifest::Flag
using State = SelectManifest::State

Public Member Functions

 Select (const sf::Font &font=FontManager<>::getDefault())
void add (ml::Core &component, const std::string &value="")
void addOption (const std::string &label, const std::string &value="", const SelectOptionStyle &style={})
SelectThemeapplyFrom (const Theme &t) override
 Populate all fields from the global Theme token set.
template<typename S>
void applySettings (const S &s)
template<typename St>
void applyStyle (const St &s)
template<typename T>
void applyTheme (const T &t)
void clearOptions ()
void clearSelection ()
void close ()
sf::Color getArrowColor () const
sf::Color getBgDisabled () const
sf::Color getBgFocused () const
sf::Color getBgHovered () const
sf::Color getBgIdle () const
sf::Color getBgOpen () const
sf::Color getBorderDisabled () const
sf::Color getBorderError () const
sf::Color getBorderFocused () const
sf::Color getBorderIdle () const
sf::Color getBorderOpen () const
float getBorderThickness () const
unsigned int getCharacterSize () const
unsigned int getDescCharSize () const
sf::Color getDisabledColor () const
sf::Color getDisabledTextColor () const
sf::Color getErrorColor () const
sf::Color getFillColor () const
sf::Color getFocusColor () const
const sf::FontgetFont () const
unsigned int getFontSize () const
unsigned int getFontSizeSmall () const
sf::FloatRect getGlobalBounds () const override
sf::Color getHoverColor () const
sf::Color getItemDescColor () const
sf::Color getItemDisabledColor () const
float getItemHeight () const
sf::Color getItemHoverBg () const
sf::Color getItemLabelColor () const
sf::Color getItemSelectedBg () const
sf::Color getLabelColor () const
sf::Color getLabelDisabled () const
std::size_t getMaxLength () const
float getMaxVisibleItems () const
sf::Color getMutedColor () const
sf::Color getOutlineColor () const
float getOutlineThickness () const
float getPadding () const
sf::Color getPanelBg () const
sf::Color getPanelBorder () const
float getPanelBorderThick () const
char32_t getPasswordChar () const
std::string getPlaceholder () const
sf::Color getPlaceholderColor () const
sf::Vector2f getPosition () const override
float getRadius () const
int getSelectedIndex () const
std::string getSelectedLabel () const
std::string getSelectedValue () const
sf::Vector2f getSize () const
sf::Color getTextColor () const
bool isEnabled () const
bool isOpen () const
bool isPasswordMode () const
bool isSettingsLocked () const
 Return true if applySettings() is currently blocked.
bool isThemeLocked () const
 Return true if this component ignores theme changes.
void lockSettings ()
 Prevent applySettings() from taking effect.
void lockTheme ()
 Prevent automatic re-styling when the global theme changes.
void onSelectionChanged (std::function< void(const std::string &, std::size_t)> callback)
void open ()
std::size_t optionCount () const
void selectIndex (std::size_t index)
void selectValue (const std::string &value)
void setArrowColor (const sf::Color &c)
void setBgDisabled (const sf::Color &c)
void setBgFocused (const sf::Color &c)
void setBgHovered (const sf::Color &c)
void setBgIdle (const sf::Color &c)
void setBgOpen (const sf::Color &c)
void setBorderDisabled (const sf::Color &c)
void setBorderError (const sf::Color &c)
void setBorderFocused (const sf::Color &c)
void setBorderIdle (const sf::Color &c)
void setBorderOpen (const sf::Color &c)
void setBorderThickness (float t)
void setDescCharSize (unsigned int s)
void setDisabledColor (const sf::Color &c)
void setDisabledTextColor (const sf::Color &c)
void setEnabled (bool enabled)
void setErrorColor (const sf::Color &c)
void setFillColor (const sf::Color &c)
void setFocusColor (const sf::Color &c)
void setFont (const sf::Font &&)=delete
void setFont (const sf::Font &f)
void setFontSize (unsigned int s)
void setFontSizeSmall (unsigned int s)
void setHoverColor (const sf::Color &c)
void setItemDescColor (const sf::Color &c)
void setItemDisabledColor (const sf::Color &c)
void setItemHeight (float h)
void setItemHoverBg (const sf::Color &c)
void setItemLabelColor (const sf::Color &c)
void setItemSelectedBg (const sf::Color &c)
void setLabelColor (const sf::Color &c)
void setLabelDisabled (const sf::Color &c)
void setMaxLength (std::size_t n)
void setMaxVisibleItems (float n)
void setMutedColor (const sf::Color &c)
void setOptionEnabled (std::size_t index, bool enabled)
void setOutlineColor (const sf::Color &c)
void setOutlineThickness (float t)
void setPadding (float p)
void setPanelBg (const sf::Color &c)
void setPanelBorder (const sf::Color &c)
void setPanelBorderThick (float t)
void setPasswordChar (char32_t c)
void setPasswordMode (bool b)
void setPlaceholder (const std::string &text)
void setPlaceholderColor (const sf::Color &c)
void setPosition (const sf::Vector2f &position) override
void setRadius (float r)
void setSize (const sf::Vector2f &s)
void setTextColor (const sf::Color &c)
void unlockSettings ()
 Allow applySettings() to take effect again.
void unlockTheme ()
 Resume reacting to global theme changes.

Public Attributes

sf::Color arrowColor = sf::Color(180, 180, 180)
sf::Color bgDisabled = sf::Color(30, 30, 30)
sf::Color bgFocused = sf::Color(50, 50, 50)
sf::Color bgHovered = sf::Color(55, 55, 55)
sf::Color bgIdle = sf::Color(40, 40, 40)
sf::Color bgOpen = sf::Color(50, 50, 50)
sf::Color borderDisabled = sf::Color(60, 60, 60)
sf::Color borderError = sf::Color(220, 70, 70)
sf::Color borderFocused = sf::Color(70, 130, 230)
sf::Color borderIdle = sf::Color(100, 100, 100)
sf::Color borderOpen = sf::Color(70, 130, 230)
float borderThickness = 1.5f
unsigned int descCharSize = 11
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::Fontfont = &FontManager<>::getDefault()
unsigned int fontSize = 14
unsigned int fontSizeSmall = 11
sf::Color hoverColor = sf::Color(70, 130, 230)
sf::Color itemDescColor = sf::Color(150, 150, 150)
sf::Color itemDisabledColor = sf::Color(80, 80, 80)
float itemHeight = 40.f
sf::Color itemHoverBg = sf::Color(70, 70, 70)
sf::Color itemLabelColor = sf::Color::White
sf::Color itemSelectedBg = sf::Color(70, 130, 230, 80)
sf::Color labelColor = sf::Color::White
sf::Color labelDisabled = sf::Color(80, 80, 80)
std::size_t maxLength = 0
 0 = unlimited
float maxVisibleItems = 6.f
sf::Color mutedColor = sf::Color(120, 120, 120)
sf::Color outlineColor = sf::Color(100, 100, 100)
float outlineThickness = 1.5f
float padding = 8.f
sf::Color panelBg = sf::Color(45, 45, 45)
sf::Color panelBorder = sf::Color(80, 80, 80)
float panelBorderThick = 1.f
char32_t passwordChar = U'\u2022'
 Bullet •
bool passwordMode = false
sf::Color placeholderColor = sf::Color(120, 120, 120)
float radius = 8.f
sf::Vector2f size = {200.f, 36.f}
sf::Color textColor = sf::Color::White

Protected Member Functions

void draw (sf::RenderTarget &target, sf::RenderStates states) const override
void onThemeApplied (const Theme &theme) override
 Called by ThemeManager when the active theme changes.

Detailed Description

A dropdown select control with rich per-item content.

Inherits SelectSettings (geometry/behaviour) and SelectTheme (colors/font) as first-class members.

See also
SelectSettings, SelectTheme, SelectStyle

Definition at line 82 of file Select.h.

Member Typedef Documentation

◆ Flag

Definition at line 88 of file Select.h.

◆ State

Definition at line 89 of file Select.h.

Constructor & Destructor Documentation

◆ Select()

ml::Select::Select ( const sf::Font & font = FontManager<>::getDefault())
explicit

Member Function Documentation

◆ add()

void ml::Select::add ( ml::Core & component,
const std::string & value = "" )

◆ addOption()

void ml::Select::addOption ( const std::string & label,
const std::string & value = "",
const SelectOptionStyle & style = {} )

◆ applyFrom()

SelectTheme & ml::SelectTheme::applyFrom ( const Theme & t)
inlineoverridevirtualinherited

Populate all fields from the global Theme token set.

Subclasses call GraphicTheme::applyFrom(t) first, then apply their own token mappings.

Reimplemented from ml::InputTheme.

Definition at line 46 of file SelectTheme.h.

◆ applySettings()

template<typename S>
void ml::Select::applySettings ( const S & s)
inline

Definition at line 136 of file Select.h.

◆ applyStyle()

template<typename St>
void ml::Select::applyStyle ( const St & s)
inline

Definition at line 154 of file Select.h.

◆ applyTheme()

template<typename T>
void ml::Select::applyTheme ( const T & t)
inline

Definition at line 145 of file Select.h.

◆ clearOptions()

void ml::Select::clearOptions ( )

◆ clearSelection()

void ml::Select::clearSelection ( )

◆ close()

void ml::Select::close ( )

◆ draw()

void ml::Select::draw ( sf::RenderTarget & target,
sf::RenderStates states ) const
overrideprotected

◆ getArrowColor()

sf::Color ml::SelectTheme::getArrowColor ( ) const
inlinenodiscardinherited

Definition at line 92 of file SelectTheme.h.

◆ getBgDisabled()

sf::Color ml::InputTheme::getBgDisabled ( ) const
inlinenodiscardinherited

Definition at line 68 of file InputTheme.h.

◆ getBgFocused()

sf::Color ml::InputTheme::getBgFocused ( ) const
inlinenodiscardinherited

Definition at line 67 of file InputTheme.h.

◆ getBgHovered()

sf::Color ml::SelectTheme::getBgHovered ( ) const
inlinenodiscardinherited

Definition at line 87 of file SelectTheme.h.

◆ getBgIdle()

sf::Color ml::InputTheme::getBgIdle ( ) const
inlinenodiscardinherited

Definition at line 66 of file InputTheme.h.

◆ getBgOpen()

sf::Color ml::SelectTheme::getBgOpen ( ) const
inlinenodiscardinherited

Definition at line 88 of file SelectTheme.h.

◆ getBorderDisabled()

sf::Color ml::InputTheme::getBorderDisabled ( ) const
inlinenodiscardinherited

Definition at line 72 of file InputTheme.h.

◆ getBorderError()

sf::Color ml::InputTheme::getBorderError ( ) const
inlinenodiscardinherited

Definition at line 71 of file InputTheme.h.

◆ getBorderFocused()

sf::Color ml::InputTheme::getBorderFocused ( ) const
inlinenodiscardinherited

Definition at line 70 of file InputTheme.h.

◆ getBorderIdle()

sf::Color ml::InputTheme::getBorderIdle ( ) const
inlinenodiscardinherited

Definition at line 69 of file InputTheme.h.

◆ getBorderOpen()

sf::Color ml::SelectTheme::getBorderOpen ( ) const
inlinenodiscardinherited

Definition at line 89 of file SelectTheme.h.

◆ getBorderThickness()

float ml::InputTheme::getBorderThickness ( ) const
inlinenodiscardinherited

Definition at line 74 of file InputTheme.h.

◆ getCharacterSize()

unsigned int ml::Select::getCharacterSize ( ) const
nodiscard

◆ getDescCharSize()

unsigned int ml::SelectSettings::getDescCharSize ( ) const
inlinenodiscardinherited

Definition at line 45 of file SelectSettings.h.

◆ getDisabledColor()

sf::Color ml::ControlTheme::getDisabledColor ( ) const
inlinenodiscardinherited

Definition at line 75 of file ControlTheme.h.

◆ getDisabledTextColor()

sf::Color ml::ControlTheme::getDisabledTextColor ( ) const
inlinenodiscardinherited

Definition at line 76 of file ControlTheme.h.

◆ getErrorColor()

sf::Color ml::ControlTheme::getErrorColor ( ) const
inlinenodiscardinherited

Definition at line 74 of file ControlTheme.h.

◆ getFillColor()

sf::Color ml::GraphicTheme::getFillColor ( ) const
inlinenodiscardinherited

Definition at line 67 of file GraphicTheme.h.

◆ getFocusColor()

sf::Color ml::ControlTheme::getFocusColor ( ) const
inlinenodiscardinherited

Definition at line 73 of file ControlTheme.h.

◆ getFont()

const sf::Font * ml::ControlTheme::getFont ( ) const
inlinenodiscardinherited

Definition at line 80 of file ControlTheme.h.

◆ getFontSize()

unsigned int ml::ControlTheme::getFontSize ( ) const
inlinenodiscardinherited

Definition at line 81 of file ControlTheme.h.

◆ getFontSizeSmall()

unsigned int ml::ControlTheme::getFontSizeSmall ( ) const
inlinenodiscardinherited

Definition at line 82 of file ControlTheme.h.

◆ getGlobalBounds()

sf::FloatRect ml::Select::getGlobalBounds ( ) const
override

◆ getHoverColor()

sf::Color ml::ControlTheme::getHoverColor ( ) const
inlinenodiscardinherited

Definition at line 72 of file ControlTheme.h.

◆ getItemDescColor()

sf::Color ml::SelectTheme::getItemDescColor ( ) const
inlinenodiscardinherited

Definition at line 108 of file SelectTheme.h.

◆ getItemDisabledColor()

sf::Color ml::SelectTheme::getItemDisabledColor ( ) const
inlinenodiscardinherited

Definition at line 109 of file SelectTheme.h.

◆ getItemHeight()

float ml::SelectSettings::getItemHeight ( ) const
inlinenodiscardinherited

Definition at line 43 of file SelectSettings.h.

◆ getItemHoverBg()

sf::Color ml::SelectTheme::getItemHoverBg ( ) const
inlinenodiscardinherited

Definition at line 105 of file SelectTheme.h.

◆ getItemLabelColor()

sf::Color ml::SelectTheme::getItemLabelColor ( ) const
inlinenodiscardinherited

Definition at line 107 of file SelectTheme.h.

◆ getItemSelectedBg()

sf::Color ml::SelectTheme::getItemSelectedBg ( ) const
inlinenodiscardinherited

Definition at line 106 of file SelectTheme.h.

◆ getLabelColor()

sf::Color ml::SelectTheme::getLabelColor ( ) const
inlinenodiscardinherited

Definition at line 90 of file SelectTheme.h.

◆ getLabelDisabled()

sf::Color ml::SelectTheme::getLabelDisabled ( ) const
inlinenodiscardinherited

Definition at line 91 of file SelectTheme.h.

◆ getMaxLength()

std::size_t ml::InputSettings::getMaxLength ( ) const
inlinenodiscardinherited

Definition at line 44 of file InputSettings.h.

◆ getMaxVisibleItems()

float ml::SelectSettings::getMaxVisibleItems ( ) const
inlinenodiscardinherited

Definition at line 44 of file SelectSettings.h.

◆ getMutedColor()

sf::Color ml::ControlTheme::getMutedColor ( ) const
inlinenodiscardinherited

Definition at line 78 of file ControlTheme.h.

◆ getOutlineColor()

sf::Color ml::GraphicTheme::getOutlineColor ( ) const
inlinenodiscardinherited

Definition at line 68 of file GraphicTheme.h.

◆ getOutlineThickness()

float ml::GraphicTheme::getOutlineThickness ( ) const
inlinenodiscardinherited

Definition at line 69 of file GraphicTheme.h.

◆ getPadding()

float ml::ControlTheme::getPadding ( ) const
inlinenodiscardinherited

Definition at line 79 of file ControlTheme.h.

◆ getPanelBg()

sf::Color ml::SelectTheme::getPanelBg ( ) const
inlinenodiscardinherited

Definition at line 103 of file SelectTheme.h.

◆ getPanelBorder()

sf::Color ml::SelectTheme::getPanelBorder ( ) const
inlinenodiscardinherited

Definition at line 104 of file SelectTheme.h.

◆ getPanelBorderThick()

float ml::SelectTheme::getPanelBorderThick ( ) const
inlinenodiscardinherited

Definition at line 110 of file SelectTheme.h.

◆ getPasswordChar()

char32_t ml::InputSettings::getPasswordChar ( ) const
inlinenodiscardinherited

Definition at line 46 of file InputSettings.h.

◆ getPlaceholder()

std::string ml::Select::getPlaceholder ( ) const
nodiscard

◆ getPlaceholderColor()

sf::Color ml::InputTheme::getPlaceholderColor ( ) const
inlinenodiscardinherited

Definition at line 73 of file InputTheme.h.

◆ getPosition()

sf::Vector2f ml::Select::getPosition ( ) const
override

◆ getRadius()

float ml::GraphicTheme::getRadius ( ) const
inlinenodiscardinherited

Definition at line 70 of file GraphicTheme.h.

◆ getSelectedIndex()

int ml::Select::getSelectedIndex ( ) const
nodiscard

◆ getSelectedLabel()

std::string ml::Select::getSelectedLabel ( ) const
nodiscard

◆ getSelectedValue()

std::string ml::Select::getSelectedValue ( ) const
nodiscard

◆ getSize()

sf::Vector2f ml::InputSettings::getSize ( ) const
inlinenodiscardinherited

Definition at line 43 of file InputSettings.h.

◆ getTextColor()

sf::Color ml::ControlTheme::getTextColor ( ) const
inlinenodiscardinherited

Definition at line 77 of file ControlTheme.h.

◆ isEnabled()

bool ml::Select::isEnabled ( ) const
nodiscard

◆ isOpen()

bool ml::Select::isOpen ( ) const
nodiscard

◆ isPasswordMode()

bool ml::InputSettings::isPasswordMode ( ) const
inlinenodiscardinherited

Definition at line 45 of file InputSettings.h.

◆ isSettingsLocked()

bool ml::Themeable::isSettingsLocked ( ) const
inlinenodiscardinherited

Return true if applySettings() is currently blocked.

Definition at line 115 of file Themeable.h.

◆ isThemeLocked()

bool ml::Themeable::isThemeLocked ( ) const
inlinenodiscardinherited

Return true if this component ignores theme changes.

Definition at line 97 of file Themeable.h.

◆ lockSettings()

void ml::Themeable::lockSettings ( )
inlineinherited

Prevent applySettings() from taking effect.

Explicit individual setter calls still work normally. Only blocks the batch applySettings() path.

Definition at line 107 of file Themeable.h.

◆ lockTheme()

void ml::Themeable::lockTheme ( )
inlineinherited

Prevent automatic re-styling when the global theme changes.

The component keeps its current visual state. Explicit individual setter calls still work normally.

Definition at line 85 of file Themeable.h.

◆ onSelectionChanged()

void ml::Select::onSelectionChanged ( std::function< void(const std::string &, std::size_t)> callback)

◆ onThemeApplied()

void ml::Select::onThemeApplied ( const Theme & theme)
overrideprotectedvirtual

Called by ThemeManager when the active theme changes.

Override in your component to re-style from the new theme. Always check isThemeLocked() first:

void onThemeApplied(const Theme& theme) override
{
if (isThemeLocked()) return;
MySettings::applyTheme(theme);
syncFromSettings();
}
void onThemeApplied(const Theme &theme) override
Called by ThemeManager when the active theme changes.
bool isThemeLocked() const
Return true if this component ignores theme changes.
Definition Themeable.h:97
Universal design token set applied across all Themeable components.
Definition Theme.h:70
Parameters
themeThe newly active theme.

Implements ml::Themeable.

◆ open()

void ml::Select::open ( )

◆ optionCount()

std::size_t ml::Select::optionCount ( ) const
nodiscard

◆ selectIndex()

void ml::Select::selectIndex ( std::size_t index)

◆ selectValue()

void ml::Select::selectValue ( const std::string & value)

◆ setArrowColor()

void ml::SelectTheme::setArrowColor ( const sf::Color & c)
inlineinherited

Definition at line 99 of file SelectTheme.h.

◆ setBgDisabled()

void ml::InputTheme::setBgDisabled ( const sf::Color & c)
inlineinherited

Definition at line 78 of file InputTheme.h.

◆ setBgFocused()

void ml::InputTheme::setBgFocused ( const sf::Color & c)
inlineinherited

Definition at line 77 of file InputTheme.h.

◆ setBgHovered()

void ml::SelectTheme::setBgHovered ( const sf::Color & c)
inlineinherited

Definition at line 94 of file SelectTheme.h.

◆ setBgIdle()

void ml::InputTheme::setBgIdle ( const sf::Color & c)
inlineinherited

Definition at line 76 of file InputTheme.h.

◆ setBgOpen()

void ml::SelectTheme::setBgOpen ( const sf::Color & c)
inlineinherited

Definition at line 95 of file SelectTheme.h.

◆ setBorderDisabled()

void ml::InputTheme::setBorderDisabled ( const sf::Color & c)
inlineinherited

Definition at line 82 of file InputTheme.h.

◆ setBorderError()

void ml::InputTheme::setBorderError ( const sf::Color & c)
inlineinherited

Definition at line 81 of file InputTheme.h.

◆ setBorderFocused()

void ml::InputTheme::setBorderFocused ( const sf::Color & c)
inlineinherited

Definition at line 80 of file InputTheme.h.

◆ setBorderIdle()

void ml::InputTheme::setBorderIdle ( const sf::Color & c)
inlineinherited

Definition at line 79 of file InputTheme.h.

◆ setBorderOpen()

void ml::SelectTheme::setBorderOpen ( const sf::Color & c)
inlineinherited

Definition at line 96 of file SelectTheme.h.

◆ setBorderThickness()

void ml::InputTheme::setBorderThickness ( float t)
inlineinherited

Definition at line 84 of file InputTheme.h.

◆ setDescCharSize()

void ml::SelectSettings::setDescCharSize ( unsigned int s)
inlineinherited

Definition at line 49 of file SelectSettings.h.

◆ setDisabledColor()

void ml::ControlTheme::setDisabledColor ( const sf::Color & c)
inlineinherited

Definition at line 87 of file ControlTheme.h.

◆ setDisabledTextColor()

void ml::ControlTheme::setDisabledTextColor ( const sf::Color & c)
inlineinherited

Definition at line 88 of file ControlTheme.h.

◆ setEnabled()

void ml::Select::setEnabled ( bool enabled)

◆ setErrorColor()

void ml::ControlTheme::setErrorColor ( const sf::Color & c)
inlineinherited

Definition at line 86 of file ControlTheme.h.

◆ setFillColor()

void ml::GraphicTheme::setFillColor ( const sf::Color & c)
inlineinherited

Definition at line 72 of file GraphicTheme.h.

◆ setFocusColor()

void ml::ControlTheme::setFocusColor ( const sf::Color & c)
inlineinherited

Definition at line 85 of file ControlTheme.h.

◆ setFont() [1/2]

void ml::Select::setFont ( const sf::Font && )
delete

◆ setFont() [2/2]

void ml::Select::setFont ( const sf::Font & f)

◆ setFontSize()

void ml::ControlTheme::setFontSize ( unsigned int s)
inlineinherited

Definition at line 94 of file ControlTheme.h.

◆ setFontSizeSmall()

void ml::ControlTheme::setFontSizeSmall ( unsigned int s)
inlineinherited

Definition at line 95 of file ControlTheme.h.

◆ setHoverColor()

void ml::ControlTheme::setHoverColor ( const sf::Color & c)
inlineinherited

Definition at line 84 of file ControlTheme.h.

◆ setItemDescColor()

void ml::SelectTheme::setItemDescColor ( const sf::Color & c)
inlineinherited

Definition at line 117 of file SelectTheme.h.

◆ setItemDisabledColor()

void ml::SelectTheme::setItemDisabledColor ( const sf::Color & c)
inlineinherited

Definition at line 118 of file SelectTheme.h.

◆ setItemHeight()

void ml::SelectSettings::setItemHeight ( float h)
inlineinherited

Definition at line 47 of file SelectSettings.h.

◆ setItemHoverBg()

void ml::SelectTheme::setItemHoverBg ( const sf::Color & c)
inlineinherited

Definition at line 114 of file SelectTheme.h.

◆ setItemLabelColor()

void ml::SelectTheme::setItemLabelColor ( const sf::Color & c)
inlineinherited

Definition at line 116 of file SelectTheme.h.

◆ setItemSelectedBg()

void ml::SelectTheme::setItemSelectedBg ( const sf::Color & c)
inlineinherited

Definition at line 115 of file SelectTheme.h.

◆ setLabelColor()

void ml::SelectTheme::setLabelColor ( const sf::Color & c)
inlineinherited

Definition at line 97 of file SelectTheme.h.

◆ setLabelDisabled()

void ml::SelectTheme::setLabelDisabled ( const sf::Color & c)
inlineinherited

Definition at line 98 of file SelectTheme.h.

◆ setMaxLength()

void ml::InputSettings::setMaxLength ( std::size_t n)
inlineinherited

Definition at line 49 of file InputSettings.h.

◆ setMaxVisibleItems()

void ml::SelectSettings::setMaxVisibleItems ( float n)
inlineinherited

Definition at line 48 of file SelectSettings.h.

◆ setMutedColor()

void ml::ControlTheme::setMutedColor ( const sf::Color & c)
inlineinherited

Definition at line 90 of file ControlTheme.h.

◆ setOptionEnabled()

void ml::Select::setOptionEnabled ( std::size_t index,
bool enabled )

◆ setOutlineColor()

void ml::GraphicTheme::setOutlineColor ( const sf::Color & c)
inlineinherited

Definition at line 73 of file GraphicTheme.h.

◆ setOutlineThickness()

void ml::GraphicTheme::setOutlineThickness ( float t)
inlineinherited

Definition at line 74 of file GraphicTheme.h.

◆ setPadding()

void ml::ControlTheme::setPadding ( float p)
inlineinherited

Definition at line 91 of file ControlTheme.h.

◆ setPanelBg()

void ml::SelectTheme::setPanelBg ( const sf::Color & c)
inlineinherited

Definition at line 112 of file SelectTheme.h.

◆ setPanelBorder()

void ml::SelectTheme::setPanelBorder ( const sf::Color & c)
inlineinherited

Definition at line 113 of file SelectTheme.h.

◆ setPanelBorderThick()

void ml::SelectTheme::setPanelBorderThick ( float t)
inlineinherited

Definition at line 119 of file SelectTheme.h.

◆ setPasswordChar()

void ml::InputSettings::setPasswordChar ( char32_t c)
inlineinherited

Definition at line 51 of file InputSettings.h.

◆ setPasswordMode()

void ml::InputSettings::setPasswordMode ( bool b)
inlineinherited

Definition at line 50 of file InputSettings.h.

◆ setPlaceholder()

void ml::Select::setPlaceholder ( const std::string & text)

◆ setPlaceholderColor()

void ml::InputTheme::setPlaceholderColor ( const sf::Color & c)
inlineinherited

Definition at line 83 of file InputTheme.h.

◆ setPosition()

void ml::Select::setPosition ( const sf::Vector2f & position)
override

◆ setRadius()

void ml::GraphicTheme::setRadius ( float r)
inlineinherited

Definition at line 75 of file GraphicTheme.h.

◆ setSize()

void ml::InputSettings::setSize ( const sf::Vector2f & s)
inlineinherited

Definition at line 48 of file InputSettings.h.

◆ setTextColor()

void ml::ControlTheme::setTextColor ( const sf::Color & c)
inlineinherited

Definition at line 89 of file ControlTheme.h.

◆ unlockSettings()

void ml::Themeable::unlockSettings ( )
inlineinherited

Allow applySettings() to take effect again.

Definition at line 112 of file Themeable.h.

◆ unlockTheme()

void ml::Themeable::unlockTheme ( )
inlineinherited

Resume reacting to global theme changes.

Does NOT immediately re-apply the current theme — call ThemeManager::get() and pass it to onThemeApplied() manually if you want to re-sync immediately after unlocking.

Definition at line 94 of file Themeable.h.

Member Data Documentation

◆ arrowColor

sf::Color ml::SelectTheme::arrowColor = sf::Color(180, 180, 180)
inherited

Definition at line 32 of file SelectTheme.h.

◆ bgDisabled

sf::Color ml::InputTheme::bgDisabled = sf::Color(30, 30, 30)
inherited

Definition at line 28 of file InputTheme.h.

◆ bgFocused

sf::Color ml::InputTheme::bgFocused = sf::Color(50, 50, 50)
inherited

Definition at line 27 of file InputTheme.h.

◆ bgHovered

sf::Color ml::SelectTheme::bgHovered = sf::Color(55, 55, 55)
inherited

Definition at line 27 of file SelectTheme.h.

◆ bgIdle

sf::Color ml::InputTheme::bgIdle = sf::Color(40, 40, 40)
inherited

Definition at line 26 of file InputTheme.h.

◆ bgOpen

sf::Color ml::SelectTheme::bgOpen = sf::Color(50, 50, 50)
inherited

Definition at line 28 of file SelectTheme.h.

◆ borderDisabled

sf::Color ml::InputTheme::borderDisabled = sf::Color(60, 60, 60)
inherited

Definition at line 32 of file InputTheme.h.

◆ borderError

sf::Color ml::InputTheme::borderError = sf::Color(220, 70, 70)
inherited

Definition at line 31 of file InputTheme.h.

◆ borderFocused

sf::Color ml::InputTheme::borderFocused = sf::Color(70, 130, 230)
inherited

Definition at line 30 of file InputTheme.h.

◆ borderIdle

sf::Color ml::InputTheme::borderIdle = sf::Color(100, 100, 100)
inherited

Definition at line 29 of file InputTheme.h.

◆ borderOpen

sf::Color ml::SelectTheme::borderOpen = sf::Color(70, 130, 230)
inherited

Definition at line 29 of file SelectTheme.h.

◆ borderThickness

float ml::InputTheme::borderThickness = 1.5f
inherited

Definition at line 34 of file InputTheme.h.

◆ descCharSize

unsigned int ml::SelectSettings::descCharSize = 11
inherited

Definition at line 28 of file SelectSettings.h.

◆ disabledColor

sf::Color ml::ControlTheme::disabledColor = sf::Color(60, 60, 60)
inherited

Definition at line 33 of file ControlTheme.h.

◆ disabledTextColor

sf::Color ml::ControlTheme::disabledTextColor = sf::Color(120, 120, 120)
inherited

Definition at line 34 of file ControlTheme.h.

◆ errorColor

sf::Color ml::ControlTheme::errorColor = sf::Color(220, 70, 70)
inherited

Definition at line 32 of file ControlTheme.h.

◆ fillColor

sf::Color ml::GraphicTheme::fillColor = sf::Color(40, 40, 40)
inherited

Definition at line 43 of file GraphicTheme.h.

◆ focusColor

sf::Color ml::ControlTheme::focusColor = sf::Color(100, 60, 200)
inherited

Definition at line 31 of file ControlTheme.h.

◆ font

const sf::Font* ml::ControlTheme::font = &FontManager<>::getDefault()
inherited

Definition at line 39 of file ControlTheme.h.

◆ fontSize

unsigned int ml::ControlTheme::fontSize = 14
inherited

Definition at line 40 of file ControlTheme.h.

◆ fontSizeSmall

unsigned int ml::ControlTheme::fontSizeSmall = 11
inherited

Definition at line 41 of file ControlTheme.h.

◆ hoverColor

sf::Color ml::ControlTheme::hoverColor = sf::Color(70, 130, 230)
inherited

Definition at line 30 of file ControlTheme.h.

◆ itemDescColor

sf::Color ml::SelectTheme::itemDescColor = sf::Color(150, 150, 150)
inherited

Definition at line 40 of file SelectTheme.h.

◆ itemDisabledColor

sf::Color ml::SelectTheme::itemDisabledColor = sf::Color(80, 80, 80)
inherited

Definition at line 41 of file SelectTheme.h.

◆ itemHeight

float ml::SelectSettings::itemHeight = 40.f
inherited

Definition at line 26 of file SelectSettings.h.

◆ itemHoverBg

sf::Color ml::SelectTheme::itemHoverBg = sf::Color(70, 70, 70)
inherited

Definition at line 37 of file SelectTheme.h.

◆ itemLabelColor

sf::Color ml::SelectTheme::itemLabelColor = sf::Color::White
inherited

Definition at line 39 of file SelectTheme.h.

◆ itemSelectedBg

sf::Color ml::SelectTheme::itemSelectedBg = sf::Color(70, 130, 230, 80)
inherited

Definition at line 38 of file SelectTheme.h.

◆ labelColor

sf::Color ml::SelectTheme::labelColor = sf::Color::White
inherited

Definition at line 30 of file SelectTheme.h.

◆ labelDisabled

sf::Color ml::SelectTheme::labelDisabled = sf::Color(80, 80, 80)
inherited

Definition at line 31 of file SelectTheme.h.

◆ maxLength

std::size_t ml::InputSettings::maxLength = 0
inherited

0 = unlimited

Definition at line 29 of file InputSettings.h.

◆ maxVisibleItems

float ml::SelectSettings::maxVisibleItems = 6.f
inherited

Definition at line 27 of file SelectSettings.h.

◆ mutedColor

sf::Color ml::ControlTheme::mutedColor = sf::Color(120, 120, 120)
inherited

Definition at line 36 of file ControlTheme.h.

◆ outlineColor

sf::Color ml::GraphicTheme::outlineColor = sf::Color(100, 100, 100)
inherited

Definition at line 44 of file GraphicTheme.h.

◆ outlineThickness

float ml::GraphicTheme::outlineThickness = 1.5f
inherited

Definition at line 45 of file GraphicTheme.h.

◆ padding

float ml::ControlTheme::padding = 8.f
inherited

Definition at line 37 of file ControlTheme.h.

◆ panelBg

sf::Color ml::SelectTheme::panelBg = sf::Color(45, 45, 45)
inherited

Definition at line 35 of file SelectTheme.h.

◆ panelBorder

sf::Color ml::SelectTheme::panelBorder = sf::Color(80, 80, 80)
inherited

Definition at line 36 of file SelectTheme.h.

◆ panelBorderThick

float ml::SelectTheme::panelBorderThick = 1.f
inherited

Definition at line 42 of file SelectTheme.h.

◆ passwordChar

char32_t ml::InputSettings::passwordChar = U'\u2022'
inherited

Bullet •

Definition at line 31 of file InputSettings.h.

◆ passwordMode

bool ml::InputSettings::passwordMode = false
inherited

Definition at line 30 of file InputSettings.h.

◆ placeholderColor

sf::Color ml::InputTheme::placeholderColor = sf::Color(120, 120, 120)
inherited

Definition at line 33 of file InputTheme.h.

◆ radius

float ml::GraphicTheme::radius = 8.f
inherited

Definition at line 46 of file GraphicTheme.h.

◆ size

sf::Vector2f ml::InputSettings::size = {200.f, 36.f}
inherited

Definition at line 28 of file InputSettings.h.

◆ textColor

sf::Color ml::ControlTheme::textColor = sf::Color::White
inherited

Definition at line 35 of file ControlTheme.h.


The documentation for this class was generated from the following file: