Player12
An open source football management simulator
Loading...
Searching...
No Matches
InboxMessage Struct Reference

A news item for the managed club. More...

#include <inbox.h>

Public Member Functions

std::string formatTitle () const
 
std::string formatBody () const
 

Public Attributes

std::uint32_t id = 0
 
GameDateValue date
 
InboxCategory category = InboxCategory::General
 
std::string title_key
 
std::string body_key
 
std::vector< std::string > args
 
bool read = false
 
std::optional< PlayerID > player_id
 
std::optional< TeamID > team_id
 

Detailed Description

A news item for the managed club.

Title and body are stored as language keys plus arguments so that messages follow the current UI language. Arguments starting with '@' are themselves language keys (e.g. "@INJURY_HAMSTRING_STRAIN"). Use formatTitle() and formatBody() to obtain display text.

Member Function Documentation

◆ formatBody()

std::string InboxMessage::formatBody ( ) const

Localised body with arguments substituted ({0}, {1}, ...).

◆ formatTitle()

std::string InboxMessage::formatTitle ( ) const

Localised title with arguments substituted ({0}, {1}, ...).

Member Data Documentation

◆ args

std::vector<std::string> InboxMessage::args

◆ body_key

std::string InboxMessage::body_key

◆ category

InboxCategory InboxMessage::category = InboxCategory::General

◆ date

GameDateValue InboxMessage::date

◆ id

std::uint32_t InboxMessage::id = 0

◆ player_id

std::optional<PlayerID> InboxMessage::player_id

Linked player, if any.

◆ read

bool InboxMessage::read = false

◆ team_id

std::optional<TeamID> InboxMessage::team_id

Linked club, if any.

◆ title_key

std::string InboxMessage::title_key

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