stmm-games-doc  0.32.0
Public Member Functions | Public Attributes | List of all members
stmg::VarWidget::LocalInit Struct Reference
Inheritance diagram for stmg::VarWidget::LocalInit:
Inheritance graph
[legend]

Public Member Functions

void setTitleAlign (const WidgetAxisFit::ALIGN &eTitleAlign) noexcept
 
void setValueAlign (const WidgetAxisFit::ALIGN &eValueAlign) noexcept
 

Public Attributes

std::string m_sTitle
 The title that describes the variable. More...
 
int32_t m_nTitleFactorPerc = 30
 The percentage of widget space for the title. More...
 
bool m_bTitleBesideValue = false
 Whether title is left or right of the value or above or below. More...
 
int32_t m_nVarId = -1
 The variable id. More...
 
OwnerType m_eVarOwnerType = OwnerType::GAME
 The variable owner type. More...
 
int32_t m_nVarDigits = 5
 The maximum number of digits of values. More...
 
std::array< WidgetAxisFit::ALIGN, g_nTotLayoutConfigs > m_aTitleAlign = {WidgetAxisFit::ALIGN_FILL, WidgetAxisFit::ALIGN_FILL}
 The alignment of the title for each layout config. More...
 
std::array< WidgetAxisFit::ALIGN, g_nTotLayoutConfigs > m_aValueAlign = {WidgetAxisFit::ALIGN_FILL, WidgetAxisFit::ALIGN_FILL}
 The alignment of the value for each layout config. More...
 

Member Function Documentation

◆ setTitleAlign()

void stmg::VarWidget::LocalInit::setTitleAlign ( const WidgetAxisFit::ALIGN eTitleAlign)
inlinenoexcept

◆ setValueAlign()

void stmg::VarWidget::LocalInit::setValueAlign ( const WidgetAxisFit::ALIGN eValueAlign)
inlinenoexcept

Member Data Documentation

◆ m_aTitleAlign

std::array<WidgetAxisFit::ALIGN, g_nTotLayoutConfigs> stmg::VarWidget::LocalInit::m_aTitleAlign = {WidgetAxisFit::ALIGN_FILL, WidgetAxisFit::ALIGN_FILL}

The alignment of the title for each layout config.

If ALIGN_FILL is used chosen by view. Default: WidgetAxisFit::ALIGN_FILL.

◆ m_aValueAlign

std::array<WidgetAxisFit::ALIGN, g_nTotLayoutConfigs> stmg::VarWidget::LocalInit::m_aValueAlign = {WidgetAxisFit::ALIGN_FILL, WidgetAxisFit::ALIGN_FILL}

The alignment of the value for each layout config.

If ALIGN_FILL is used chosen by view. Default: WidgetAxisFit::ALIGN_FILL.

◆ m_bTitleBesideValue

bool stmg::VarWidget::LocalInit::m_bTitleBesideValue = false

Whether title is left or right of the value or above or below.

Default: false.

◆ m_eVarOwnerType

OwnerType stmg::VarWidget::LocalInit::m_eVarOwnerType = OwnerType::GAME

The variable owner type.

Team and mate must be defined accordingly. Default is OwnerType::GAME.

◆ m_nTitleFactorPerc

int32_t stmg::VarWidget::LocalInit::m_nTitleFactorPerc = 30

The percentage of widget space for the title.

Must be >= 0 and <= 100. Default: 30.

◆ m_nVarDigits

int32_t stmg::VarWidget::LocalInit::m_nVarDigits = 5

The maximum number of digits of values.

Used to calc a stable font size. Default: 5.

◆ m_nVarId

int32_t stmg::VarWidget::LocalInit::m_nVarId = -1

The variable id.

Must be >= 0 and exist for the widget's m_eVarOwnerType. Default: -1.

◆ m_sTitle

std::string stmg::VarWidget::LocalInit::m_sTitle

The title that describes the variable.

If empty no title i shown and m_bTitleBesideValue, m_nTitleFactorPerc, m_eTitleAlign are ignored.