The Battle for Wesnoth  1.17.0-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 
35 bool fi_invert()
36 {
37  return preferences::get("fi_invert", false);
38 }
39 
40 void set_fi_invert(bool value)
41 {
42  preferences::set("fi_invert", value);
43 }
44 
46 {
47  return preferences::get("fi_vacant_slots", false);
48 }
49 
50 void set_fi_vacant_slots(bool value)
51 {
52  preferences::set("fi_vacant_slots", value);
53 }
54 
56 {
57  return preferences::get("fi_friends_in_game", false);
58 }
59 
60 void set_fi_friends_in_game(bool value)
61 {
62  preferences::set("fi_friends_in_game", value);
63 }
64 
66 {
67  return preferences::get("fi_blocked_in_game", false);
68 }
69 
70 void set_fi_blocked_in_game(bool value)
71 {
72  preferences::set("fi_blocked_in_game", value);
73 }
74 
75 } // end namespace preferences
bool fi_vacant_slots()
Definition: lobby.cpp:45
void set_fi_vacant_slots(bool value)
Definition: lobby.cpp:50
void set(const std::string &key, bool value)
Definition: general.cpp:160
void set_fi_blocked_in_game(bool value)
Definition: lobby.cpp:70
void set_fi_friends_in_game(bool value)
Definition: lobby.cpp:60
bool whisper_friends_only()
Definition: lobby.cpp:20
bool fi_blocked_in_game()
Definition: lobby.cpp:65
bool auto_open_whisper_windows()
Definition: lobby.cpp:30
std::string get(const std::string &key)
Definition: general.cpp:208
void set_fi_invert(bool value)
Definition: lobby.cpp:40
Modify, read and display user preferences.
void set_whisper_friends_only(bool v)
Definition: lobby.cpp:25
bool fi_invert()
Definition: lobby.cpp:35
bool fi_friends_in_game()
Definition: lobby.cpp:55