36 const
mp::lobby_info& li)
43 , add_to_friends_(
nullptr)
44 , add_to_ignores_(
nullptr)
45 , remove_from_list_(
nullptr)
46 , result_open_whisper_(false)
57 relation_ = find_widget<label>(
"relation_info",
false,
true);
59 button& whisper = find_widget<button>(
"start_whisper");
64 whisper.set_active(
false);
78 = find_widget<button>(
"remove_from_list",
false,
true);
84 find_widget<button>(
"check_status"),
88 find_widget<button>(
"kick"),
92 find_widget<button>(
"kick_ban"),
96 find_widget<button>(
"stopgame"),
99 find_widget<label>(
"player_name").set_label(
info_.
name);
101 std::stringstream
loc;
103 if(
game !=
nullptr) {
104 loc <<
_(
"In game:") <<
" " <<
game->name <<
" ";
106 loc <<
_(
"(observing)");
108 loc <<
_(
"(playing)");
111 loc <<
_(
"In lobby");
114 time_ = find_widget<text_box>(
"time",
false,
true);
115 reason_ = find_widget<text_box>(
"reason",
false,
true);
119 find_widget<label>(
"location_info").set_label(
loc.str());
212 std::stringstream ss;
223 std::stringstream ss;
224 ss << (ban ?
"kban " :
"kick ") <<
info_.
name;
void send_command(const std::string &cmd, const std::string &args="")
void kick_button_callback()
void kick_ban_button_callback()
virtual void post_show() override
Actions to be taken after the window has been shown.
void start_whisper_button_callback()
bool result_open_whisper_
void stopgame_button_callback()
const mp::user_info & info_
virtual void pre_show() override
Actions to be taken before showing the window.
const mp::lobby_info & lobby_info_
void remove_from_list_button_callback()
void add_to_ignores_button_callback()
button * remove_from_list_
void add_to_friends_button_callback()
void do_kick_ban(bool ban)
events::chat_handler & chat_
void check_status_button_callback()
Abstract base class for all modal dialogs.
std::string get_value() const
void close()
Requests to close the window.
widget * find(const std::string_view id, const bool must_be_active) override
See widget::find.
void add_to_tab_order(widget *widget, int at=-1)
Add the widget to the tabbing order.
game_info * get_game_by_id(int id)
Returns info on a game with the given game ID.
std::pair< preferences::acquaintance *, bool > add_acquaintance(const std::string &nick, const std::string &mode, const std::string ¬es)
bool remove_acquaintance(const std::string &nick)
static std::string _(const char *str)
Handling of system events.
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
Main entry points of multiplayer mode.
bool logged_in_as_moderator()
Gets whether the currently logged-in user is a moderator.
This class represents the info a client has about a game on the server.
user_relation get_relation() const