39 const
mp::lobby_info& li)
46 , add_to_friends_(
nullptr)
47 , add_to_ignores_(
nullptr)
48 , remove_from_list_(
nullptr)
49 , result_open_whisper_(false)
62 button& whisper = find_widget<button>(&
window,
"start_whisper",
false);
67 whisper.set_active(
false);
81 = find_widget<button>(&
window,
"remove_from_list",
false,
true);
87 find_widget<button>(&
window,
"check_status",
false),
91 find_widget<button>(&
window,
"kick",
false),
95 find_widget<button>(&
window,
"kick_ban",
false),
99 find_widget<button>(&
window,
"stopgame",
false),
102 find_widget<label>(&
window,
"player_name",
false).set_label(
info_.
name);
104 std::stringstream loc;
106 if(
game !=
nullptr) {
107 loc <<
_(
"In game:") <<
" " <<
game->name <<
" ";
109 loc <<
_(
"(observing)");
111 loc <<
_(
"(playing)");
114 loc <<
_(
"In lobby");
117 time_ = find_widget<text_box>(&
window,
"time",
false,
true);
118 reason_ = find_widget<text_box>(&
window,
"reason",
false,
true);
122 find_widget<label>(&
window,
"location_info",
false).set_label(loc.str());
215 std::stringstream ss;
226 std::stringstream ss;
227 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(window &window) 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_
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)
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
events::chat_handler & chat_
void check_status_button_callback()
Abstract base class for all modal dialogs.
window * get_window()
Returns a pointer to the dialog's window.
std::string get_value() const
base class of top level items, the only item which needs to store the final canvases to draw on.
void close()
Requests to close the window.
widget * find(const std::string &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.
static std::string _(const char *str)
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
Handling of system events.
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.
bool remove_acquaintance(const std::string &nick)
std::pair< preferences::acquaintance *, bool > add_acquaintance(const std::string &nick, const std::string &mode, const std::string ¬es)
This file contains the settings handling of the widget library.
This class represents the info a client has about a game on the server.
user_relation get_relation() const