The Battle for Wesnoth  1.19.0-dev
lobby.cpp
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 #include "preferences/lobby.hpp"
17 #include "preferences/game.hpp"
18 
19 namespace preferences
20 {
22 {
23  return preferences::get("lobby_whisper_friends_only", false);
24 }
25 
27 {
28  preferences::set("lobby_whisper_friends_only", v);
29 }
30 
32 {
33  return preferences::get("lobby_auto_open_whisper_windows", true);
34 }
35 
36 bool fi_invert()
37 {
38  return preferences::get("fi_invert", false);
39 }
40 
41 void set_fi_invert(bool value)
42 {
43  preferences::set("fi_invert", value);
44 }
45 
47 {
48  return preferences::get("fi_vacant_slots", false);
49 }
50 
51 void set_fi_vacant_slots(bool value)
52 {
53  preferences::set("fi_vacant_slots", value);
54 }
55 
57 {
58  return preferences::get("fi_friends_in_game", false);
59 }
60 
61 void set_fi_friends_in_game(bool value)
62 {
63  preferences::set("fi_friends_in_game", value);
64 }
65 
67 {
68  return preferences::get("fi_blocked_in_game", false);
69 }
70 
71 void set_fi_blocked_in_game(bool value)
72 {
73  preferences::set("fi_blocked_in_game", value);
74 }
75 
76 } // end namespace preferences
Modify, read and display user preferences.
void set_fi_friends_in_game(bool value)
Definition: lobby.cpp:61
void set(const std::string &key, bool value)
Definition: general.cpp:165
bool whisper_friends_only()
Definition: lobby.cpp:21
bool fi_blocked_in_game()
Definition: lobby.cpp:66
bool fi_invert()
Definition: lobby.cpp:36
void set_fi_vacant_slots(bool value)
Definition: lobby.cpp:51
bool fi_friends_in_game()
Definition: lobby.cpp:56
bool fi_vacant_slots()
Definition: lobby.cpp:46
void set_fi_blocked_in_game(bool value)
Definition: lobby.cpp:71
void set_fi_invert(bool value)
Definition: lobby.cpp:41
std::string get(const std::string &key)
Definition: general.cpp:213
void set_whisper_friends_only(bool v)
Definition: lobby.cpp:26
bool auto_open_whisper_windows()
Definition: lobby.cpp:31