The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lobby_preferences.cpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Tomasz Sniatowski <[email protected]>
3  Part of the Battle for Wesnoth Project http://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 "lobby_preferences.hpp"
16 #include "game_preferences.hpp"
18 #include "util.hpp"
19 
20 namespace preferences {
21 
22 bool sort_list()
23 {
24  return preferences::get("sort_list", true);
25 }
26 
27 void _set_sort_list(bool sort)
28 {
29  preferences::set("sort_list", sort);
30 }
31 
33 {
34  return preferences::get("iconize_list", true);
35 }
36 
38 {
39  preferences::set("iconize_list", sort);
40 }
41 
43 {
44  return preferences::get("lobby_whisper_friends_only", false);
45 }
46 
48 {
49  preferences::set("lobby_whisper_friends_only", v);
50 }
51 
53 {
54  return preferences::get("lobby_auto_open_whisper_windows", true);
55 }
56 
58 {
59  return preferences::get("lobby_playerlist_sort_relation", true);
60 }
61 
63 {
64  return preferences::set("lobby_playerlist_sort_relation", v);
65 }
66 
68 {
69  return preferences::get("lobby_playerlist_sort_name", true);
70 }
71 
73 {
74  return preferences::set("lobby_playerlist_sort_name", v);
75 }
76 
78 {
79  return preferences::get("lobby_playerlist_group_players", true);
80 }
81 
83 {
84  return preferences::get("filter_lobby", false);
85 }
86 
88 {
89  preferences::set("filter_lobby", value);
90 }
91 
92 bool fi_invert()
93 {
94  return preferences::get("fi_invert", false);
95 }
96 
97 void set_fi_invert(bool value)
98 {
99  preferences::set("fi_invert", value);
100 }
101 
103 {
104  return preferences::get("fi_vacant_slots", false);
105 }
106 
108 {
109  preferences::set("fi_vacant_slots", value);
110 }
111 
113 {
114  return preferences::get("fi_friends_in_game", false);
115 }
116 
118 {
119  preferences::set("fi_friends_in_game", value);
120 }
121 
123 {
124  return preferences::get("fi_text");
125 }
126 
127 void set_fi_text(const std::string& search_string)
128 {
129  preferences::set("fi_text", search_string);
130 }
131 
132 } //end namespace preferences
void set_filter_lobby(bool value)
void _set_sort_list(bool sort)
void set_fi_vacant_slots(bool value)
void set_playerlist_sort_name(bool v)
void set(const std::string &key, bool value)
void set_fi_friends_in_game(bool value)
void set_fi_text(const std::string &search_string)
bool whisper_friends_only()
void set_playerlist_sort_relation(bool v)
bool auto_open_whisper_windows()
std::string get(const std::string &key)
const GLdouble * v
Definition: glew.h:1359
GLsizei const GLfloat * value
Definition: glew.h:1817
void set_fi_invert(bool value)
Modify, read and display user preferences.
Templates and utility-routines for strings and numbers.
bool playerlist_sort_relation()
void set_whisper_friends_only(bool v)
static int sort(lua_State *L)
Definition: ltablib.cpp:246
GLsizei const GLcharARB ** string
Definition: glew.h:4503
bool playerlist_sort_name()
bool playerlist_group_players()
std::string fi_text()
void _set_iconize_list(bool sort)