The Battle for Wesnoth  1.15.2+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 
41 {
42  return preferences::get("filter_lobby", false);
43 }
44 
45 void set_filter_lobby(bool value)
46 {
47  preferences::set("filter_lobby", value);
48 }
49 
50 bool fi_invert()
51 {
52  return preferences::get("fi_invert", false);
53 }
54 
55 void set_fi_invert(bool value)
56 {
57  preferences::set("fi_invert", value);
58 }
59 
61 {
62  return preferences::get("fi_vacant_slots", false);
63 }
64 
65 void set_fi_vacant_slots(bool value)
66 {
67  preferences::set("fi_vacant_slots", value);
68 }
69 
71 {
72  return preferences::get("fi_friends_in_game", false);
73 }
74 
75 void set_fi_friends_in_game(bool value)
76 {
77  preferences::set("fi_friends_in_game", value);
78 }
79 
80 std::string fi_text()
81 {
82  return preferences::get("fi_text");
83 }
84 
85 void set_fi_text(const std::string& search_string)
86 {
87  preferences::set("fi_text", search_string);
88 }
89 
90 } //end namespace preferences
void set_filter_lobby(bool value)
Definition: lobby.cpp:45
bool fi_vacant_slots()
Definition: lobby.cpp:60
void set_fi_vacant_slots(bool value)
Definition: lobby.cpp:65
void set(const std::string &key, bool value)
Definition: general.cpp:180
void set_fi_friends_in_game(bool value)
Definition: lobby.cpp:75
void set_fi_text(const std::string &search_string)
Definition: lobby.cpp:85
bool whisper_friends_only()
Definition: lobby.cpp:20
bool auto_open_whisper_windows()
Definition: lobby.cpp:30
std::string get(const std::string &key)
Definition: general.cpp:228
bool filter_lobby()
Definition: lobby.cpp:40
void set_fi_invert(bool value)
Definition: lobby.cpp:55
Modify, read and display user preferences.
void set_whisper_friends_only(bool v)
Definition: lobby.cpp:25
bool fi_invert()
Definition: lobby.cpp:50
bool fi_friends_in_game()
Definition: lobby.cpp:70
bool playerlist_group_players()
Definition: lobby.cpp:35
std::string fi_text()
Definition: lobby.cpp:80