Loading...
Searching...
No Matches
ml::SegmentSettings Struct Reference

Layout and behaviour settings for SegmentToggle. More...

#include <Malena/Traits/Settings/SegmentSettings.h>

Inheritance diagram for ml::SegmentSettings:
[legend]

Public Member Functions

void addItem (const std::string &label, const std::string &key)
void clearItems ()
float getAnimSpeed () const
const std::vector< std::pair< std::string, std::string > > & getItems () const
std::string getOffLabel () const
std::string getOnLabel () const
float getSegPadding () const
float getSegRadius () const
sf::Vector2f getSize () const
SegmentSettingsoperator= (const ControlSettings &c)
SegmentSettingsoperator= (const GraphicSettings &g)
SegmentSettingsoperator= (const ToggleSettings &t)
void setAnimSpeed (float s)
void setItems (std::vector< std::pair< std::string, std::string > > i)
void setOffLabel (const std::string &s)
void setOnLabel (const std::string &s)
void setSegmentLabels (const std::string &off, const std::string &on)
void setSegPadding (float p)
void setSegRadius (float r)
void setSize (const sf::Vector2f &s)

Public Attributes

float animSpeed = 10.f
std::vector< std::pair< std::string, std::string > > items
std::string offLabel = "Off"
std::string onLabel = "On"
float segPadding = 3.f
float segRadius = 20.f
sf::Vector2f size = {200.f, 36.f}

Detailed Description

Layout and behaviour settings for SegmentToggle.

Colors live in SegmentTheme.

See also
ToggleSettings, SegmentTheme, SegmentStyle, SegmentToggle

Definition at line 25 of file SegmentSettings.h.

Member Function Documentation

◆ addItem()

void ml::ToggleSettings::addItem ( const std::string & label,
const std::string & key )
inlineinherited

Definition at line 57 of file ToggleSettings.h.

◆ clearItems()

void ml::ToggleSettings::clearItems ( )
inlineinherited

Definition at line 60 of file ToggleSettings.h.

◆ getAnimSpeed()

float ml::ToggleSettings::getAnimSpeed ( ) const
inlinenodiscardinherited

Definition at line 48 of file ToggleSettings.h.

◆ getItems()

const std::vector< std::pair< std::string, std::string > > & ml::ToggleSettings::getItems ( ) const
inlinenodiscardinherited

Definition at line 52 of file ToggleSettings.h.

◆ getOffLabel()

std::string ml::SegmentSettings::getOffLabel ( ) const
inlinenodiscard

Definition at line 61 of file SegmentSettings.h.

◆ getOnLabel()

std::string ml::SegmentSettings::getOnLabel ( ) const
inlinenodiscard

Definition at line 62 of file SegmentSettings.h.

◆ getSegPadding()

float ml::SegmentSettings::getSegPadding ( ) const
inlinenodiscard

Definition at line 60 of file SegmentSettings.h.

◆ getSegRadius()

float ml::SegmentSettings::getSegRadius ( ) const
inlinenodiscard

Definition at line 59 of file SegmentSettings.h.

◆ getSize()

sf::Vector2f ml::SegmentSettings::getSize ( ) const
inlinenodiscard

Definition at line 58 of file SegmentSettings.h.

◆ operator=() [1/3]

SegmentSettings & ml::SegmentSettings::operator= ( const ControlSettings & c)
inline

Definition at line 44 of file SegmentSettings.h.

◆ operator=() [2/3]

SegmentSettings & ml::SegmentSettings::operator= ( const GraphicSettings & g)
inline

Definition at line 50 of file SegmentSettings.h.

◆ operator=() [3/3]

SegmentSettings & ml::SegmentSettings::operator= ( const ToggleSettings & t)
inline

Definition at line 38 of file SegmentSettings.h.

◆ setAnimSpeed()

void ml::ToggleSettings::setAnimSpeed ( float s)
inlineinherited

Definition at line 49 of file ToggleSettings.h.

◆ setItems()

void ml::ToggleSettings::setItems ( std::vector< std::pair< std::string, std::string > > i)
inlineinherited

Definition at line 54 of file ToggleSettings.h.

◆ setOffLabel()

void ml::SegmentSettings::setOffLabel ( const std::string & s)
inline

Definition at line 67 of file SegmentSettings.h.

◆ setOnLabel()

void ml::SegmentSettings::setOnLabel ( const std::string & s)
inline

Definition at line 68 of file SegmentSettings.h.

◆ setSegmentLabels()

void ml::SegmentSettings::setSegmentLabels ( const std::string & off,
const std::string & on )
inline

Definition at line 69 of file SegmentSettings.h.

◆ setSegPadding()

void ml::SegmentSettings::setSegPadding ( float p)
inline

Definition at line 66 of file SegmentSettings.h.

◆ setSegRadius()

void ml::SegmentSettings::setSegRadius ( float r)
inline

Definition at line 65 of file SegmentSettings.h.

◆ setSize()

void ml::SegmentSettings::setSize ( const sf::Vector2f & s)
inline

Definition at line 64 of file SegmentSettings.h.

Member Data Documentation

◆ animSpeed

float ml::ToggleSettings::animSpeed = 10.f
inherited

Definition at line 29 of file ToggleSettings.h.

◆ items

std::vector<std::pair<std::string, std::string> > ml::ToggleSettings::items
inherited

Definition at line 30 of file ToggleSettings.h.

◆ offLabel

std::string ml::SegmentSettings::offLabel = "Off"

Definition at line 33 of file SegmentSettings.h.

◆ onLabel

std::string ml::SegmentSettings::onLabel = "On"

Definition at line 34 of file SegmentSettings.h.

◆ segPadding

float ml::SegmentSettings::segPadding = 3.f

Definition at line 30 of file SegmentSettings.h.

◆ segRadius

float ml::SegmentSettings::segRadius = 20.f

Definition at line 29 of file SegmentSettings.h.

◆ size

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

Definition at line 28 of file SegmentSettings.h.


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