The Battle for Wesnoth
1.19.5+dev
gui
dialogs
multiplayer
player_info.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2009 - 2024
3
by Tomasz Sniatowski <kailoran@gmail.com>
4
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY.
12
13
See the COPYING file for more details.
14
*/
15
16
#pragma once
17
18
#include "
gui/dialogs/modal_dialog.hpp
"
19
#include "
chat_events.hpp
"
20
#include "
game_initialization/lobby_info.hpp
"
21
22
namespace
gui2
23
{
24
25
class
button;
26
class
label
;
27
class
text_box;
28
29
namespace
dialogs
30
{
31
32
class
lobby_player_info
:
public
modal_dialog
33
{
34
public
:
35
lobby_player_info
(
events::chat_handler
& chat,
36
const
mp::user_info
&
info
,
37
const
mp::lobby_info
& li);
38
39
~lobby_player_info
();
40
41
bool
result_open_whisper
()
const
42
{
43
return
result_open_whisper_
;
44
}
45
46
private
:
47
virtual
const
std::string&
window_id
()
const override
;
48
49
virtual
void
pre_show
()
override
;
50
51
virtual
void
post_show
()
override
;
52
53
void
update_relation
();
54
55
void
add_to_friends_button_callback
();
56
57
void
add_to_ignores_button_callback
();
58
59
void
remove_from_list_button_callback
();
60
61
void
start_whisper_button_callback
();
62
63
void
check_status_button_callback
();
64
65
void
kick_button_callback
();
66
67
void
kick_ban_button_callback
();
68
69
void
stopgame_button_callback
();
70
71
void
do_stopgame
();
72
73
void
do_kick_ban
(
bool
ban);
74
75
events::chat_handler
&
chat_
;
76
77
const
mp::user_info
&
info_
;
78
79
text_box
*
reason_
;
80
81
text_box
*
time_
;
82
83
label
*
relation_
;
84
85
button
*
add_to_friends_
;
86
87
button
*
add_to_ignores_
;
88
89
button
*
remove_from_list_
;
90
91
bool
result_open_whisper_
;
92
93
const
mp::lobby_info
&
lobby_info_
;
94
};
95
96
}
// namespace dialogs
97
}
// end namespace gui2
chat_events.hpp
events::chat_handler
Definition:
chat_events.hpp:26
gui2::button
Simple push button.
Definition:
button.hpp:36
gui2::dialogs::lobby_player_info
Definition:
player_info.hpp:33
gui2::dialogs::lobby_player_info::kick_button_callback
void kick_button_callback()
Definition:
player_info.cpp:192
gui2::dialogs::lobby_player_info::kick_ban_button_callback
void kick_ban_button_callback()
Definition:
player_info.cpp:198
gui2::dialogs::lobby_player_info::post_show
virtual void post_show() override
Actions to be taken after the window has been shown.
Definition:
player_info.cpp:129
gui2::dialogs::lobby_player_info::lobby_player_info
lobby_player_info(events::chat_handler &chat, const mp::user_info &info, const mp::lobby_info &li)
Definition:
player_info.cpp:34
gui2::dialogs::lobby_player_info::do_stopgame
void do_stopgame()
Definition:
player_info.cpp:210
gui2::dialogs::lobby_player_info::start_whisper_button_callback
void start_whisper_button_callback()
Definition:
player_info.cpp:180
gui2::dialogs::lobby_player_info::result_open_whisper_
bool result_open_whisper_
Definition:
player_info.hpp:91
gui2::dialogs::lobby_player_info::stopgame_button_callback
void stopgame_button_callback()
Definition:
player_info.cpp:204
gui2::dialogs::lobby_player_info::time_
text_box * time_
Definition:
player_info.hpp:81
gui2::dialogs::lobby_player_info::info_
const mp::user_info & info_
Definition:
player_info.hpp:77
gui2::dialogs::lobby_player_info::relation_
label * relation_
Definition:
player_info.hpp:83
gui2::dialogs::lobby_player_info::reason_
text_box * reason_
Definition:
player_info.hpp:79
gui2::dialogs::lobby_player_info::pre_show
virtual void pre_show() override
Actions to be taken before showing the window.
Definition:
player_info.cpp:55
gui2::dialogs::lobby_player_info::window_id
virtual const std::string & window_id() const override
The ID of the window to build.
gui2::dialogs::lobby_player_info::add_to_ignores_
button * add_to_ignores_
Definition:
player_info.hpp:87
gui2::dialogs::lobby_player_info::lobby_info_
const mp::lobby_info & lobby_info_
Definition:
player_info.hpp:93
gui2::dialogs::lobby_player_info::remove_from_list_button_callback
void remove_from_list_button_callback()
Definition:
player_info.cpp:174
gui2::dialogs::lobby_player_info::add_to_ignores_button_callback
void add_to_ignores_button_callback()
Definition:
player_info.cpp:168
gui2::dialogs::lobby_player_info::remove_from_list_
button * remove_from_list_
Definition:
player_info.hpp:89
gui2::dialogs::lobby_player_info::add_to_friends_button_callback
void add_to_friends_button_callback()
Definition:
player_info.cpp:162
gui2::dialogs::lobby_player_info::do_kick_ban
void do_kick_ban(bool ban)
Definition:
player_info.cpp:221
gui2::dialogs::lobby_player_info::update_relation
void update_relation()
Definition:
player_info.cpp:133
gui2::dialogs::lobby_player_info::~lobby_player_info
~lobby_player_info()
Definition:
player_info.cpp:51
gui2::dialogs::lobby_player_info::add_to_friends_
button * add_to_friends_
Definition:
player_info.hpp:85
gui2::dialogs::lobby_player_info::chat_
events::chat_handler & chat_
Definition:
player_info.hpp:75
gui2::dialogs::lobby_player_info::result_open_whisper
bool result_open_whisper() const
Definition:
player_info.hpp:41
gui2::dialogs::lobby_player_info::check_status_button_callback
void check_status_button_callback()
Definition:
player_info.cpp:186
gui2::dialogs::modal_dialog
Abstract base class for all modal dialogs.
Definition:
modal_dialog.hpp:146
gui2::label
Definition:
label.hpp:32
gui2::text_box
A widget that allows the user to input text in single line.
Definition:
text_box.hpp:125
mp::lobby_info
This class represents the collective information the client has about the players and games on the se...
Definition:
lobby_info.hpp:31
label
std::string label
What to show in the filter's drop-down list.
Definition:
manager.cpp:200
lobby_info.hpp
modal_dialog.hpp
dialogs
Various uncategorised dialogs.
gui2
Generic file dialog.
Definition:
draw_manager.hpp:21
lg::info
logger & info()
Definition:
log.cpp:319
mp::user_info
This class represents the information a client has about another player.
Definition:
lobby_data.hpp:30
Generated by
1.9.1