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),
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);
119 window.add_to_tab_order(reason_);
120 window.add_to_tab_order(
time_);
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;
window(const builder_window::window_resolution &definition)
< Needs to be initialized in show.
void close()
Requests to close the window.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
void kick_button_callback()
void connect_signal_mouse_left_click(dispatcher &dispatcher, const signal &signal)
Connects a signal handler for a left mouse button click.
void start_whisper_button_callback()
This class represents the info a client has about a game on the server.
std::string get_value() const
void do_kick_ban(bool ban)
const mp::user_info & info_
void send_command(const std::string &cmd, const std::string &args="")
static std::string _(const char *str)
void check_status_button_callback()
bool remove_acquaintance(const std::string &nick)
const mp::lobby_info & lobby_info_
bool logged_in_as_moderator()
Gets whether the currently logged-in user is a moderator.
game_info * get_game_by_id(int id)
Returns info on a game with the given game ID.
Main entry points of multiplayer mode.
user_relation get_relation() const
This file contains the settings handling of the widget library.
void kick_ban_button_callback()
std::pair< preferences::acquaintance *, bool > add_acquaintance(const std::string &nick, const std::string &mode, const std::string ¬es)
void add_to_ignores_button_callback()
button * remove_from_list_
window * get_window()
Returns a pointer to the dialog's window.
events::chat_handler & chat_
void add_to_friends_button_callback()
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
Handling of system events.
void remove_from_list_button_callback()
Abstract base class for all modal dialogs.
bool result_open_whisper_
base class of top level items, the only item which needs to store the final canvases to draw on...
void stopgame_button_callback()