This class represents the information a client has about another player. More...
#include <data.hpp>
Public Types | |
enum | user_relation { FRIEND, ME, 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 |
This class represents the information a client has about another player.
|
explicit |
Definition at line 99 of file data.cpp.
References update_relation().
bool user_info::operator> | ( | const user_info & | b | ) | const |
void user_info::update_relation | ( | ) |
Definition at line 129 of file data.cpp.
References FRIEND, IGNORED, preferences::is_friend(), preferences::is_ignored(), preferences::login(), ME, NEUTRAL, and relation.
Referenced by update_state(), and user_info().
Definition at line 110 of file data.cpp.
References GAME, game_id, room_info::is_member(), LOBBY, SEL_GAME, SEL_ROOM, state, and update_relation().
int user_info::game_id |
Definition at line 126 of file data.hpp.
Referenced by gui2::tlobby_player_info::pre_show(), update_state(), and gui2::tlobby_main::user_dialog_callback().
std::string user_info::name |
Definition at line 125 of file data.hpp.
Referenced by gui2::tlobby_player_info::add_to_friends_button_callback(), gui2::tlobby_player_info::add_to_ignores_button_callback(), gui2::tlobby_player_info::check_status_button_callback(), gui2::tlobby_player_info::do_kick_ban(), user_sorter_name::operator()(), user_sorter_relation_name::operator()(), gui2::tlobby_player_info::pre_show(), gui2::tlobby_player_info::remove_from_list_button_callback(), gui2::tlobby_main::update_playerlist(), and gui2::tlobby_main::user_dialog_callback().
bool user_info::observing |
Definition at line 130 of file data.hpp.
Referenced by gui2::tlobby_player_info::pre_show(), and gui2::tlobby_main::update_playerlist().
bool user_info::registered |
Definition at line 129 of file data.hpp.
Referenced by gui2::tlobby_main::update_playerlist().
user_relation user_info::relation |
Definition at line 127 of file data.hpp.
Referenced by gui2::tlobby_player_info::add_to_friends_button_callback(), gui2::tlobby_player_info::add_to_ignores_button_callback(), user_sorter_relation::operator()(), user_sorter_relation_name::operator()(), gui2::tlobby_player_info::remove_from_list_button_callback(), gui2::tlobby_main::update_playerlist(), gui2::tlobby_player_info::update_relation(), and update_relation().
user_state user_info::state |
Definition at line 128 of file data.hpp.
Referenced by gui2::tlobby_main::update_playerlist(), and update_state().