The Battle for Wesnoth  1.15.2+dev
Public Types | Public Member Functions | Public Attributes | List of all members
mp::user_info Struct Reference

This class represents the information a client has about another player. More...

#include <lobby_data.hpp>

Public Types

enum  user_relation { ME, FRIEND, NEUTRAL, IGNORED }
 
enum  user_state { LOBBY, SEL_ROOM, GAME, SEL_GAME }
 

Public Member Functions

 user_info (const config &c)
 
void update_state (int selected_game_id, const room_info *current_room=nullptr)
 
void update_relation ()
 
bool operator< (const user_info &b) const
 

Public Attributes

std::string name
 
int game_id
 
user_relation relation
 
user_state state
 
bool registered
 
bool observing
 

Detailed Description

This class represents the information a client has about another player.

Definition at line 104 of file lobby_data.hpp.

Member Enumeration Documentation

◆ user_relation

Enumerator
ME 
FRIEND 
NEUTRAL 
IGNORED 

Definition at line 112 of file lobby_data.hpp.

◆ user_state

Enumerator
LOBBY 
SEL_ROOM 
GAME 
SEL_GAME 

Definition at line 118 of file lobby_data.hpp.

Constructor & Destructor Documentation

◆ user_info()

mp::user_info::user_info ( const config c)
explicit

Definition at line 109 of file lobby_data.cpp.

References update_relation().

Member Function Documentation

◆ operator<()

bool mp::user_info::operator< ( const user_info b) const

Definition at line 152 of file lobby_data.cpp.

References translation::icompare(), name, relation, and font::unicode_em_dash.

◆ update_relation()

void mp::user_info::update_relation ( )

◆ update_state()

void mp::user_info::update_state ( int  selected_game_id,
const room_info current_room = nullptr 
)

Member Data Documentation

◆ game_id

int mp::user_info::game_id

◆ name

std::string mp::user_info::name

◆ observing

bool mp::user_info::observing

Definition at line 132 of file lobby_data.hpp.

Referenced by gui2::dialogs::lobby_player_info::pre_show().

◆ registered

bool mp::user_info::registered

Definition at line 131 of file lobby_data.hpp.

Referenced by gui2::dialogs::mp_create_game::pre_show().

◆ relation

user_relation mp::user_info::relation

◆ state

user_state mp::user_info::state

Definition at line 130 of file lobby_data.hpp.

Referenced by update_state().


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