-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
lobby_player_info.hpp
94 lines (61 loc) · 1.99 KB
/
lobby_player_info.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
Copyright (C) 2009 - 2016 by Tomasz Sniatowski <kailoran@gmail.com>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY.
See the COPYING file for more details.
*/
#ifndef GUI_DIALOGS_LOBBY_PLAYER_INFO_HPP_INCLUDED
#define GUI_DIALOGS_LOBBY_PLAYER_INFO_HPP_INCLUDED
#include "gui/dialogs/dialog.hpp"
#include "chat_events.hpp"
#include "gui/dialogs/lobby/lobby_info.hpp"
namespace gui2
{
class tbutton;
class tlabel;
class ttext_box;
class tlobby_player_info : public tdialog
{
public:
tlobby_player_info(events::chat_handler& chat,
user_info& info,
const lobby_info& li);
~tlobby_player_info();
bool result_open_whisper() const
{
return result_open_whisper_;
}
private:
/** Inherited from tdialog, implemented by REGISTER_DIALOG. */
virtual const std::string& window_id() const;
/** Inherited from tdialog. */
void pre_show(CVideo& video, twindow& window);
/** Inherited from tdialog. */
void post_show(twindow& window);
void update_relation(twindow& w);
void add_to_friends_button_callback(twindow& w);
void add_to_ignores_button_callback(twindow& w);
void remove_from_list_button_callback(twindow& w);
void start_whisper_button_callback(twindow& w);
void check_status_button_callback(twindow& w);
void kick_button_callback(twindow& w);
void kick_ban_button_callback(twindow& w);
void do_kick_ban(bool ban);
events::chat_handler& chat_;
user_info& info_;
ttext_box* reason_;
ttext_box* time_;
tlabel* relation_;
tbutton* add_to_friends_;
tbutton* add_to_ignores_;
tbutton* remove_from_list_;
bool result_open_whisper_;
const lobby_info& lobby_info_;
};
} // end namespace gui2
#endif