The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Namespaces | Macros | Functions | Variables
game_preferences.cpp File Reference
#include "global.hpp"
#include "game_board.hpp"
#include "game_display.hpp"
#include "game_preferences.hpp"
#include "gettext.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "serialization/string_utils.hpp"
#include "serialization/unicode_cast.hpp"
#include "settings.hpp"
#include "units/unit.hpp"
#include "units/map.hpp"
#include "wml_exception.hpp"
#include <cassert>
Include dependency graph for game_preferences.cpp:

Go to the source code of this file.

Namespaces

 preferences
 Modify, read and display user preferences.
 
 preferences::prv
 

Macros

#define GETTEXT_DOMAIN   "wesnoth-lib"
 
#define ERR_CFG   LOG_STREAM(err , log_config)
 

Functions

bool preferences::is_authenticated ()
 
void preferences::parse_admin_authentication (const std::string &sender, const std::string &message)
 
static void preferences::load_acquaintances ()
 
static void preferences::save_acquaintances ()
 
const std::map< std::string,
acquaintance > & 
preferences::get_acquaintances ()
 
std::map< std::string,
std::string
preferences::get_acquaintances_nice (const std::string &filter)
 
bool preferences::add_friend (const std::string &nick, const std::string &notes)
 
bool preferences::add_ignore (const std::string &nick, const std::string &reason)
 
bool preferences::remove_acquaintance (const std::string &nick)
 
bool preferences::is_friend (const std::string &nick)
 
bool preferences::is_ignored (const std::string &nick)
 
void preferences::add_completed_campaign (const std::string &campaign_id, const std::string &difficulty_level)
 
bool preferences::is_campaign_completed (const std::string &campaign_id)
 
bool preferences::is_campaign_completed (const std::string &campaign_id, const std::string &difficulty_level)
 
bool preferences::parse_should_show_lobby_join (const std::string &sender, const std::string &message)
 
int preferences::lobby_joins ()
 
void preferences::_set_lobby_joins (int show)
 
bool preferences::new_lobby ()
 
const std::vector
< game_config::server_info > & 
preferences::server_list ()
 
std::string preferences::network_host ()
 
void preferences::set_network_host (const std::string &host)
 
unsigned int preferences::get_ping_timeout ()
 
std::string preferences::campaign_server ()
 
void preferences::set_campaign_server (const std::string &host)
 
bool preferences::wrap_password ()
 Returns whether the password is stored wrapped in markers. More...
 
void preferences::set_wrap_password (bool wrap)
 
bool preferences::wrap_login ()
 Returns whether the MP username is stored wrapped in markers. More...
 
void preferences::set_wrap_login (bool wrap)
 
static std::string preferences::get_system_username ()
 
std::string preferences::login ()
 
void preferences::set_login (const std::string &username)
 
std::string preferences::password ()
 
void preferences::set_password (const std::string &password)
 
bool preferences::remember_password ()
 
void preferences::set_remember_password (bool remember)
 
bool preferences::turn_dialog ()
 
void preferences::set_turn_dialog (bool ison)
 
bool preferences::enable_whiteboard_mode_on_start ()
 
void preferences::set_enable_whiteboard_mode_on_start (bool value)
 
bool preferences::hide_whiteboard ()
 
void preferences::set_hide_whiteboard (bool value)
 
bool preferences::show_combat ()
 
bool preferences::allow_observers ()
 
void preferences::set_allow_observers (bool value)
 
bool preferences::registered_users_only ()
 
void preferences::set_registered_users_only (bool value)
 
bool preferences::shuffle_sides ()
 
void preferences::set_shuffle_sides (bool value)
 
std::string preferences::random_faction_mode ()
 
void preferences::set_random_faction_mode (const std::string &value)
 
bool preferences::use_map_settings ()
 
void preferences::set_use_map_settings (bool value)
 
int preferences::mp_server_warning_disabled ()
 
void preferences::set_mp_server_warning_disabled (int value)
 
void preferences::set_mp_server_program_name (const std::string &path)
 
std::string preferences::get_mp_server_program_name ()
 
bool preferences::random_start_time ()
 
void preferences::set_random_start_time (bool value)
 
bool preferences::fog ()
 
void preferences::set_fog (bool value)
 
bool preferences::shroud ()
 
void preferences::set_shroud (bool value)
 
int preferences::turns ()
 
void preferences::set_turns (int value)
 
const configpreferences::options ()
 
void preferences::set_options (const config &values)
 
bool preferences::skip_mp_replay ()
 
void preferences::set_skip_mp_replay (bool value)
 
bool preferences::blindfold_replay ()
 
void preferences::set_blindfold_replay (bool value)
 
bool preferences::countdown ()
 
void preferences::set_countdown (bool value)
 
int preferences::countdown_init_time ()
 
void preferences::set_countdown_init_time (int value)
 
int preferences::countdown_reservoir_time ()
 
void preferences::set_countdown_reservoir_time (int value)
 
int preferences::countdown_turn_bonus ()
 
void preferences::set_countdown_turn_bonus (int value)
 
int preferences::countdown_action_bonus ()
 
void preferences::set_countdown_action_bonus (int value)
 
int preferences::village_gold ()
 
void preferences::set_village_gold (int value)
 
int preferences::village_support ()
 
void preferences::set_village_support (int value)
 
int preferences::xp_modifier ()
 
void preferences::set_xp_modifier (int value)
 
std::string preferences::era ()
 
void preferences::set_era (const std::string &value)
 
std::string preferences::level ()
 
void preferences::set_level (const std::string &value)
 
int preferences::level_type ()
 
void preferences::set_level_type (int value)
 
const std::vector< std::string > & preferences::modifications (bool mp)
 
void preferences::set_modifications (const std::vector< std::string > &value, bool mp)
 
bool preferences::show_ai_moves ()
 
void preferences::set_show_ai_moves (bool value)
 
void preferences::set_show_side_colors (bool value)
 
bool preferences::show_side_colors ()
 
void preferences::set_save_replays (bool value)
 
bool preferences::save_replays ()
 
void preferences::set_delete_saves (bool value)
 
bool preferences::delete_saves ()
 
void preferences::set_ask_delete_saves (bool value)
 
bool preferences::ask_delete_saves ()
 
void preferences::set_interrupt_when_ally_sighted (bool value)
 
bool preferences::interrupt_when_ally_sighted ()
 
int preferences::autosavemax ()
 
void preferences::set_autosavemax (int value)
 
std::string preferences::theme ()
 
void preferences::set_theme (const std::string &theme)
 
bool preferences::show_floating_labels ()
 
void preferences::set_show_floating_labels (bool value)
 
bool preferences::message_private ()
 
void preferences::set_message_private (bool value)
 
bool preferences::show_haloes ()
 
void preferences::set_show_haloes (bool value)
 
compression::format preferences::save_compression_format ()
 
std::string preferences::get_chat_timestamp (const time_t &t)
 
bool preferences::chat_timestamping ()
 
void preferences::set_chat_timestamping (bool value)
 
int preferences::chat_lines ()
 
void preferences::set_chat_lines (int lines)
 
void preferences::set_chat_message_aging (const int aging)
 
int preferences::chat_message_aging ()
 
void preferences::set_max_wml_menu_items (int max)
 
int preferences::max_wml_menu_items ()
 
bool preferences::show_all_units_in_help ()
 
void preferences::set_show_all_units_in_help (bool value)
 
std::set< std::string > & preferences::encountered_units ()
 
std::set
< t_translation::t_terrain > & 
preferences::encountered_terrains ()
 
std::string preferences::custom_command ()
 
void preferences::set_custom_command (const std::string &command)
 
std::vector< std::string > * preferences::get_history (const std::string &id)
 Returns a pointer to the history vector associated with given id making a new one if it doesn't exist. More...
 
bool preferences::green_confirm ()
 
bool preferences::yellow_confirm ()
 
bool preferences::confirm_no_moves ()
 
void preferences::encounter_recruitable_units (const std::vector< team > &teams)
 
void preferences::encounter_start_units (const unit_map &units)
 
static void preferences::encounter_recallable_units (const std::vector< team > &teams)
 
void preferences::encounter_map_terrain (const gamemap &map)
 
void preferences::encounter_all_content (const game_board &gameboard_)
 

Variables

static lg::log_domain log_config ("config")
 
std::string preferences::prv::password
 

Macro Definition Documentation

#define ERR_CFG   LOG_STREAM(err , log_config)

Definition at line 49 of file game_preferences.cpp.

#define GETTEXT_DOMAIN   "wesnoth-lib"

Definition at line 17 of file game_preferences.cpp.

Variable Documentation

lg::log_domain log_config("config")
static