stmm-games-doc  0.32.0
Public Member Functions | Public Attributes | List of all members
stmg::HighscoresDefinition::ScoreElement Struct Reference

Element of a score for a team. More...

Public Member Functions

bool operator== (const ScoreElement &oHS) const noexcept
 

Public Attributes

std::string m_sVarDescription
 If this field is empty the value shouldn't be shown in a highscore table. More...
 
std::string m_sVarName = ""
 The name of the variable, the value of which is used to build a score. More...
 
bool m_bLowestBest = false
 If false a higher value means a better score. More...
 

Detailed Description

Element of a score for a team.

Many elements can be used for a score. Example: {"Points", OwnerType::TEAM, nPointsVarId, false}, {"Time", OwnerType::GAME, nTimeVarId, true}

Note: HighscoresDefinition doesn't check for the validity of the variable name. The Highscore class should do it.

Member Function Documentation

◆ operator==()

bool stmg::HighscoresDefinition::ScoreElement::operator== ( const ScoreElement oHS) const
noexcept

Member Data Documentation

◆ m_bLowestBest

bool stmg::HighscoresDefinition::ScoreElement::m_bLowestBest = false

If false a higher value means a better score.

Default is false.

◆ m_sVarDescription

std::string stmg::HighscoresDefinition::ScoreElement::m_sVarDescription

If this field is empty the value shouldn't be shown in a highscore table.

◆ m_sVarName

std::string stmg::HighscoresDefinition::ScoreElement::m_sVarName = ""

The name of the variable, the value of which is used to build a score.

Cannot be empty.