The Battle for Wesnoth  1.15.12+dev
lobby.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2018 by Tomasz Sniatowski <kailoran@gmail.com>
3  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #include "preferences/lobby.hpp"
16 #include "preferences/game.hpp"
17 
18 namespace preferences
19 {
21 {
22  return preferences::get("lobby_whisper_friends_only", false);
23 }
24 
26 {
27  preferences::set("lobby_whisper_friends_only", v);
28 }
29 
31 {
32  return preferences::get("lobby_auto_open_whisper_windows", true);
33 }
34 
36 {
37  return preferences::get("lobby_playerlist_group_players", true);
38 }
39 
40 bool fi_invert()
41 {
42  return preferences::get("fi_invert", false);
43 }
44 
45 void set_fi_invert(bool value)
46 {
47  preferences::set("fi_invert", value);
48 }
49 
51 {
52  return preferences::get("fi_vacant_slots", false);
53 }
54 
55 void set_fi_vacant_slots(bool value)
56 {
57  preferences::set("fi_vacant_slots", value);
58 }
59 
61 {
62  return preferences::get("fi_friends_in_game", false);
63 }
64 
65 void set_fi_friends_in_game(bool value)
66 {
67  preferences::set("fi_friends_in_game", value);
68 }
69 
71 {
72  return preferences::get("fi_blocked_in_game", false);
73 }
74 
75 void set_fi_blocked_in_game(bool value)
76 {
77  preferences::set("fi_blocked_in_game", value);
78 }
79 
80 } // end namespace preferences
bool fi_vacant_slots()
Definition: lobby.cpp:50
void set_fi_vacant_slots(bool value)
Definition: lobby.cpp:55
void set(const std::string &key, bool value)
Definition: general.cpp:178
void set_fi_blocked_in_game(bool value)
Definition: lobby.cpp:75
void set_fi_friends_in_game(bool value)
Definition: lobby.cpp:65
bool whisper_friends_only()
Definition: lobby.cpp:20
bool fi_blocked_in_game()
Definition: lobby.cpp:70
bool auto_open_whisper_windows()
Definition: lobby.cpp:30
std::string get(const std::string &key)
Definition: general.cpp:226
void set_fi_invert(bool value)
Definition: lobby.cpp:45
Modify, read and display user preferences.
void set_whisper_friends_only(bool v)
Definition: lobby.cpp:25
bool fi_invert()
Definition: lobby.cpp:40
bool fi_friends_in_game()
Definition: lobby.cpp:60
bool playerlist_group_players()
Definition: lobby.cpp:35