37 const
mp::lobby_info& li)
44 , add_to_friends_(
nullptr)
45 , add_to_ignores_(
nullptr)
46 , remove_from_list_(
nullptr)
47 , result_open_whisper_(false)
60 button& whisper = find_widget<button>(&
window,
"start_whisper",
false);
65 whisper.set_active(
false);
79 = find_widget<button>(&
window,
"remove_from_list",
false,
true);
85 find_widget<button>(&
window,
"check_status",
false),
89 find_widget<button>(&
window,
"kick",
false),
93 find_widget<button>(&
window,
"kick_ban",
false),
97 find_widget<button>(&
window,
"stopgame",
false),
100 find_widget<label>(&
window,
"player_name",
false).set_label(
info_.
name);
102 std::stringstream loc;
104 if(
game !=
nullptr) {
105 loc <<
_(
"In game:") <<
" " <<
game->name <<
" ";
107 loc <<
_(
"(observing)");
109 loc <<
_(
"(playing)");
112 loc <<
_(
"In lobby");
115 time_ = find_widget<text_box>(&
window,
"time",
false,
true);
116 reason_ = find_widget<text_box>(&
window,
"reason",
false,
true);
120 find_widget<label>(&
window,
"location_info",
false).set_label(loc.str());
213 std::stringstream ss;
224 std::stringstream ss;
225 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)
Handling of system events.
REGISTER_DIALOG(tod_new_schedule)
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 class represents the info a client has about a game on the server.
user_relation get_relation() const