The Battle for Wesnoth  1.19.2+dev
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
prefs Class Reference

#include <preferences.hpp>

Public Member Functions

 ~prefs ()
 
void write_preferences ()
 
void load_advanced_prefs (const game_config_view &gc)
 
void migrate_preferences (const std::string &prefs_dir)
 
void reload_preferences ()
 
std::set< std::string > all_attributes ()
 
std::string core_id ()
 
void set_core_id (const std::string &root)
 
bool scroll_to_action ()
 
void set_scroll_to_action (bool ison)
 
point resolution ()
 
void set_resolution (const point &res)
 
int pixel_scale ()
 
void set_pixel_scale (const int scale)
 
bool auto_pixel_scale ()
 
void set_auto_pixel_scale (bool choice)
 
bool maximized ()
 
void set_maximized (bool ison)
 
bool fullscreen ()
 
void set_fullscreen (bool ison)
 
bool vsync ()
 
void set_vsync (bool ison)
 
bool turbo ()
 
void set_turbo (bool ison)
 
double turbo_speed ()
 
void set_turbo_speed (const double speed)
 
int font_scaling ()
 
void set_font_scaling (int scale)
 
int font_scaled (int size)
 
int keepalive_timeout ()
 
void keepalive_timeout (int seconds)
 
bool idle_anim ()
 
void set_idle_anim (const bool ison)
 
int idle_anim_rate ()
 
void set_idle_anim_rate (int rate)
 
std::string language ()
 
void set_language (const std::string &s)
 
std::string gui_theme ()
 
void set_gui_theme (const std::string &s)
 
bool sound_on ()
 
bool set_sound (bool ison)
 
unsigned int sample_rate ()
 
void save_sample_rate (const unsigned int rate)
 
std::size_t sound_buffer_size ()
 
void save_sound_buffer_size (const std::size_t size)
 
int sound_volume ()
 
void set_sound_volume (int vol)
 
int bell_volume ()
 
void set_bell_volume (int vol)
 
int ui_volume ()
 
void set_ui_volume (int vol)
 
bool music_on ()
 
bool set_music (bool ison)
 
int music_volume ()
 
void set_music_volume (int vol)
 
bool stop_music_in_background ()
 
void set_stop_music_in_background (bool ison)
 
unsigned int tile_size ()
 
void set_tile_size (const unsigned int size)
 
bool turn_bell ()
 
bool set_turn_bell (bool ison)
 
bool ui_sound_on ()
 
bool set_ui_sound (bool ison)
 
bool message_bell ()
 
void load_hotkeys ()
 
void save_hotkeys ()
 
void clear_hotkeys ()
 
void add_alias (const std::string &alias, const std::string &command)
 
optional_const_config get_alias ()
 
std::string allied_color ()
 
void set_allied_color (const std::string &color_id)
 
std::string enemy_color ()
 
void set_enemy_color (const std::string &color_id)
 
std::string unmoved_color ()
 
void set_unmoved_color (const std::string &color_id)
 
std::string partial_color ()
 
void set_partial_color (const std::string &color_id)
 
std::string moved_color ()
 
void set_moved_color (const std::string &color_id)
 
bool show_ally_orb ()
 
void set_show_ally_orb (bool show_orb)
 
bool show_status_on_ally_orb ()
 
void set_show_status_on_ally_orb (bool show_orb)
 
bool show_enemy_orb ()
 
void set_show_enemy_orb (bool show_orb)
 
bool show_moved_orb ()
 
void set_show_moved_orb (bool show_orb)
 
bool show_unmoved_orb ()
 
void set_show_unmoved_orb (bool show_orb)
 
bool show_partial_orb ()
 
void set_show_partial_orb (bool show_orb)
 
bool show_disengaged_orb ()
 
void set_show_disengaged_orb (bool show_orb)
 
int scroll_speed ()
 
void set_scroll_speed (const int scroll)
 
bool middle_click_scrolls ()
 
bool mouse_scroll_enabled ()
 
void enable_mouse_scroll (bool value)
 
int mouse_scroll_threshold ()
 Gets the threshold for when to scroll. More...
 
int draw_delay ()
 
void set_draw_delay (int value)
 
bool animate_map ()
 
void set_animate_map (bool value)
 
bool animate_water ()
 
void set_animate_water (bool value)
 
bool minimap_movement_coding ()
 
void toggle_minimap_movement_coding ()
 
bool minimap_terrain_coding ()
 
void toggle_minimap_terrain_coding ()
 
bool minimap_draw_units ()
 
void toggle_minimap_draw_units ()
 
bool minimap_draw_villages ()
 
void toggle_minimap_draw_villages ()
 
bool minimap_draw_terrain ()
 
void toggle_minimap_draw_terrain ()
 
bool show_fps ()
 
void set_show_fps (bool value)
 
bool ellipses ()
 
void set_ellipses (bool ison)
 
bool grid ()
 
void set_grid (bool ison)
 
bool confirm_load_save_from_different_version ()
 
bool use_twelve_hour_clock_format ()
 
bool disable_auto_moves ()
 
void set_disable_auto_moves (bool value)
 
bool damage_prediction_allow_monte_carlo_simulation ()
 
void set_damage_prediction_allow_monte_carlo_simulation (bool value)
 
std::string addon_manager_saved_order_name ()
 
void set_addon_manager_saved_order_name (const std::string &value)
 
sort_order::type addon_manager_saved_order_direction ()
 
void set_addon_manager_saved_order_direction (sort_order::type value)
 
std::string selected_achievement_group ()
 
void set_selected_achievement_group (const std::string &content_for)
 
bool achievement (const std::string &content_for, const std::string &id)
 
void set_achievement (const std::string &content_for, const std::string &id)
 Marks the specified achievement as completed. More...
 
int progress_achievement (const std::string &content_for, const std::string &id, int limit=999999, int max_progress=999999, int amount=0)
 Increments the achievement's current progress by amount if it hasn't already been completed. More...
 
bool sub_achievement (const std::string &content_for, const std::string &id, const std::string &sub_id)
 
void set_sub_achievement (const std::string &content_for, const std::string &id, const std::string &sub_id)
 Marks the specified sub-achievement as completed. More...
 
void set_editor_chosen_addon (const std::string &addon_id)
 
std::string editor_chosen_addon ()
 
void set_last_cache_cleared_version (const std::string &version)
 
std::string last_cache_cleared_version ()
 
bool get_show_deprecation (bool def)
 
bool get_scroll_when_mouse_outside (bool def)
 
void set_dir_bookmarks (const config &cfg)
 
optional_const_config dir_bookmarks ()
 
bool whisper_friends_only ()
 
void set_whisper_friends_only (bool v)
 
bool auto_open_whisper_windows ()
 
bool fi_invert ()
 
void set_fi_invert (bool value)
 
bool fi_vacant_slots ()
 
void set_fi_vacant_slots (bool value)
 
bool fi_friends_in_game ()
 
void set_fi_friends_in_game (bool value)
 
bool fi_blocked_in_game ()
 
void set_fi_blocked_in_game (bool value)
 
int editor_auto_update_transitions ()
 
void set_editor_auto_update_transitions (int value)
 
std::string default_dir ()
 
bool editor_draw_terrain_codes ()
 
void set_editor_draw_terrain_codes (bool value)
 
bool editor_draw_hex_coordinates ()
 
void set_editor_draw_hex_coordinates (bool value)
 
bool editor_draw_num_of_bitmaps ()
 
void set_editor_draw_num_of_bitmaps (bool value)
 
std::size_t editor_mru_limit ()
 
std::vector< std::string > do_read_editor_mru ()
 
void do_commit_editor_mru (const std::vector< std::string > &mru)
 
std::vector< std::string > recent_files ()
 Retrieves the list of recently opened files. More...
 
void add_recent_files_entry (const std::string &path)
 Adds an entry to the recent files list. More...
 
bool use_color_cursors ()
 
void set_color_cursors (bool value)
 
bool show_standing_animations ()
 
void set_show_standing_animations (bool value)
 
void show_wesnothd_server_search ()
 
bool show_theme_dialog ()
 
void set_theme (const std::string &theme)
 
std::string theme ()
 
void set_mp_server_program_name (const std::string &)
 
std::string get_mp_server_program_name ()
 
bool parse_should_show_lobby_join (const std::string &sender, const std::string &message)
 
pref_constants::lobby_joins get_lobby_joins ()
 
void set_lobby_joins (pref_constants::lobby_joins show)
 
const std::map< std::string, preferences::acquaintance > & get_acquaintances ()
 
const std::string get_ignored_delim ()
 
std::map< std::string, std::string > get_acquaintances_nice (const std::string &filter)
 
std::pair< preferences::acquaintance *, bool > add_acquaintance (const std::string &nick, const std::string &mode, const std::string &notes)
 
void add_completed_campaign (const std::string &campaign_id, const std::string &difficulty_level)
 
bool remove_acquaintance (const std::string &nick)
 
bool is_friend (const std::string &nick)
 
bool is_ignored (const std::string &nick)
 
bool is_campaign_completed (const std::string &campaign_id)
 
bool is_campaign_completed (const std::string &campaign_id, const std::string &difficulty_level)
 
const std::vector< game_config::server_info > & builtin_servers_list ()
 
std::vector< game_config::server_infouser_servers_list ()
 
void set_user_servers_list (const std::vector< game_config::server_info > &value)
 
std::string network_host ()
 
void set_network_host (const std::string &host)
 
std::string campaign_server ()
 
void set_campaign_server (const std::string &host)
 
bool turn_dialog ()
 
void set_turn_dialog (bool ison)
 
bool enable_whiteboard_mode_on_start ()
 
void set_enable_whiteboard_mode_on_start (bool value)
 
bool hide_whiteboard ()
 
void set_hide_whiteboard (bool value)
 
bool show_combat ()
 
bool allow_observers ()
 
void set_allow_observers (bool value)
 
bool shuffle_sides ()
 
void set_shuffle_sides (bool value)
 
std::string random_faction_mode ()
 
void set_random_faction_mode (const std::string &value)
 
bool use_map_settings ()
 
void set_use_map_settings (bool value)
 
int mp_server_warning_disabled ()
 
void set_mp_server_warning_disabled (int value)
 
bool random_start_time ()
 
void set_random_start_time (bool value)
 
bool fog ()
 
void set_fog (bool value)
 
bool shroud ()
 
void set_shroud (bool value)
 
int turns ()
 
void set_turns (int value)
 
const configoptions ()
 
void set_options (const config &values)
 
bool skip_mp_replay ()
 
void set_skip_mp_replay (bool value)
 
bool blindfold_replay ()
 
void set_blindfold_replay (bool value)
 
bool countdown ()
 
void set_countdown (bool value)
 
int countdown_init_time ()
 
void set_countdown_init_time (int value)
 
void clear_countdown_init_time ()
 
int countdown_turn_bonus ()
 
void set_countdown_turn_bonus (int value)
 
void clear_countdown_turn_bonus ()
 
int countdown_reservoir_time ()
 
void set_countdown_reservoir_time (int value)
 
void clear_countdown_reservoir_time ()
 
int countdown_action_bonus ()
 
void set_countdown_action_bonus (int value)
 
void clear_countdown_action_bonus ()
 
int village_gold ()
 
void set_village_gold (int value)
 
int village_support ()
 
void set_village_support (int value)
 
int xp_modifier ()
 
void set_xp_modifier (int value)
 
std::string era ()
 
void set_era (const std::string &value)
 
std::string level ()
 
void set_level (const std::string &value)
 
int level_type ()
 
void set_level_type (int value)
 
const std::vector< std::string > & modifications (bool mp=true)
 
void set_modifications (const std::vector< std::string > &value, bool mp=true)
 
bool skip_ai_moves ()
 
void set_skip_ai_moves (bool value)
 
void set_show_side_colors (bool value)
 
bool show_side_colors ()
 
bool save_replays ()
 
void set_save_replays (bool value)
 
bool delete_saves ()
 
void set_delete_saves (bool value)
 
void set_ask_delete_saves (bool value)
 
bool ask_delete_saves ()
 
void set_interrupt_when_ally_sighted (bool value)
 
bool interrupt_when_ally_sighted ()
 
void set_autosavemax (int value)
 
int autosavemax ()
 
bool show_floating_labels ()
 
void set_show_floating_labels (bool value)
 
bool message_private ()
 
void set_message_private (bool value)
 
std::string get_chat_timestamp (const std::time_t &t)
 
bool chat_timestamping ()
 
void set_chat_timestamping (bool value)
 
int chat_lines ()
 
void set_chat_lines (int lines)
 
int chat_message_aging ()
 
void set_chat_message_aging (const int aging)
 
bool show_all_units_in_help ()
 
void set_show_all_units_in_help (bool value)
 
compression::format save_compression_format ()
 
std::set< std::string > & encountered_units ()
 
std::set< t_translation::terrain_code > & encountered_terrains ()
 
std::string custom_command ()
 
void set_custom_command (const std::string &command)
 
std::vector< std::string > * 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 yellow_confirm ()
 
bool green_confirm ()
 
bool confirm_no_moves ()
 
void encounter_recruitable_units (const std::vector< team > &teams)
 
void encounter_start_units (const unit_map &units)
 
void encounter_recallable_units (const std::vector< team > &teams)
 
void encounter_map_terrain (const gamemap &map)
 
void encounter_all_content (const game_board &gb)
 
bool player_joins_sound ()
 
void set_player_joins_sound (bool val)
 
bool player_joins_lobby ()
 
void set_player_joins_lobby (bool val)
 
bool player_joins_notif ()
 
void set_player_joins_notif (bool val)
 
bool player_leaves_sound ()
 
void set_player_leaves_sound (bool val)
 
bool player_leaves_lobby ()
 
void set_player_leaves_lobby (bool val)
 
bool player_leaves_notif ()
 
void set_player_leaves_notif (bool val)
 
bool private_message_sound ()
 
void set_private_message_sound (bool val)
 
bool private_message_lobby ()
 
void set_private_message_lobby (bool val)
 
bool private_message_notif ()
 
void set_private_message_notif (bool val)
 
bool friend_message_sound ()
 
void set_friend_message_sound (bool val)
 
bool friend_message_lobby ()
 
void set_friend_message_lobby (bool val)
 
bool friend_message_notif ()
 
void set_friend_message_notif (bool val)
 
bool public_message_sound ()
 
void set_public_message_sound (bool val)
 
bool public_message_lobby ()
 
void set_public_message_lobby (bool val)
 
bool public_message_notif ()
 
void set_public_message_notif (bool val)
 
bool server_message_sound ()
 
void set_server_message_sound (bool val)
 
bool server_message_lobby ()
 
void set_server_message_lobby (bool val)
 
bool server_message_notif ()
 
void set_server_message_notif (bool val)
 
bool ready_for_start_sound ()
 
void set_ready_for_start_sound (bool val)
 
bool ready_for_start_lobby ()
 
void set_ready_for_start_lobby (bool val)
 
bool ready_for_start_notif ()
 
void set_ready_for_start_notif (bool val)
 
bool game_has_begun_sound ()
 
void set_game_has_begun_sound (bool val)
 
bool game_has_begun_lobby ()
 
void set_game_has_begun_lobby (bool val)
 
bool game_has_begun_notif ()
 
void set_game_has_begun_notif (bool val)
 
bool turn_changed_sound ()
 
void set_turn_changed_sound (bool val)
 
bool turn_changed_lobby ()
 
void set_turn_changed_lobby (bool val)
 
bool turn_changed_notif ()
 
void set_turn_changed_notif (bool val)
 
bool game_created_sound ()
 
void set_game_created_sound (bool val)
 
bool game_created_lobby ()
 
void set_game_created_lobby (bool val)
 
bool game_created_notif ()
 
void set_game_created_notif (bool val)
 
void clear_mp_alert_prefs ()
 
bool remember_password ()
 
void set_remember_password (bool remember)
 
std::string login ()
 
void set_login (const std::string &login)
 
std::string password (const std::string &server, const std::string &login)
 
void set_password (const std::string &server, const std::string &login, const std::string &key)
 
std::vector< preferences::option > & get_advanced_preferences ()
 

Static Public Member Functions

static prefsget ()
 
static void disable_preferences_save ()
 
static bool preferences_save ()
 

Private Member Functions

 prefs ()
 
 prefs (const prefs &p)=delete
 
prefsoperator= (const prefs &p)=delete
 
 prefs (const prefs &&p)=delete
 
prefsoperator= (const prefs &&p)=delete
 
void load_preferences ()
 
void clear_preferences ()
 
void load_credentials ()
 
void save_credentials ()
 
void clear_credentials ()
 
void set_child (const std::string &key, const config &val)
 
optional_const_config get_child (const std::string &key)
 
std::string get (const std::string &key, const std::string &def)
 
config::attribute_value get_as_attribute (const std::string &key)
 
std::string get_system_username ()
 
preferences::secure_buffer aes_encrypt (const preferences::secure_buffer &text, const preferences::secure_buffer &key)
 Encrypts the value of text using key and a hard coded IV using AES. More...
 
preferences::secure_buffer aes_decrypt (const preferences::secure_buffer &text, const preferences::secure_buffer &key)
 Same as aes_encrypt(), except of course it takes encrypted data as an argument and returns decrypted data. More...
 
preferences::secure_buffer build_key (const std::string &server, const std::string &login)
 Fills a secure_buffer with 32 bytes of deterministically generated bytes, then overwrites it with the system login name, server login name, and server name. More...
 
preferences::secure_buffer escape (const preferences::secure_buffer &text)
 
preferences::secure_buffer unescape (const preferences::secure_buffer &text)
 

Private Attributes

config preferences_
 
bool fps_
 
std::map< std::string, std::set< std::string > > completed_campaigns_
 
std::set< std::string > encountered_units_set_
 
std::set< t_translation::terrain_codeencountered_terrains_set_
 
std::map< std::string, std::vector< std::string > > history_map_
 
std::map< std::string, preferences::acquaintanceacquaintances_
 
config option_values_
 
bool options_initialized_
 
std::vector< std::string > mp_modifications_
 
bool mp_modifications_initialized_
 
std::vector< std::string > sp_modifications_
 
bool sp_modifications_initialized_
 
bool message_private_on_
 
std::vector< preferences::login_infocredentials_
 
std::vector< preferences::optionadvanced_prefs_
 
std::set< std::string > unknown_synced_attributes_
 
std::set< std::string > unknown_unsynced_attributes_
 
std::set< std::string > unknown_synced_children_
 
std::set< std::string > unknown_unsynced_children_
 

Static Private Attributes

static bool no_preferences_save = false
 
static constexpr std::array synced_attributes_
 
static constexpr std::array synced_children_
 
static constexpr std::array unsynced_attributes_
 
static constexpr std::array unsynced_children_
 

Friends

struct preferences_dialog_friend
 
int impl_preferences_set (lua_State *L)
 The __newindex metamethod. More...
 
int impl_preferences_get (lua_State *L)
 The __index metamethod. More...
 

Detailed Description

Definition at line 183 of file preferences.hpp.

Constructor & Destructor Documentation

◆ ~prefs()

prefs::~prefs ( )

◆ prefs() [1/3]

prefs::prefs ( )
private

◆ prefs() [2/3]

prefs::prefs ( const prefs p)
privatedelete

◆ prefs() [3/3]

prefs::prefs ( const prefs &&  p)
privatedelete

Member Function Documentation

◆ achievement()

bool prefs::achievement ( const std::string &  content_for,
const std::string &  id 
)
Parameters
content_forThe achievement group the achievement is part of.
idThe ID of the achievement within the achievement group.
Returns
True if the achievement exists and is completed, false otherwise.

Definition at line 1263 of file preferences.cpp.

References config::child_range(), preferences_, and utils::split().

Referenced by progress_achievement(), set_sub_achievement(), and sub_achievement().

◆ add_acquaintance()

std::pair< preferences::acquaintance *, bool > prefs::add_acquaintance ( const std::string &  nick,
const std::string &  mode,
const std::string &  notes 
)

◆ add_alias()

void prefs::add_alias ( const std::string &  alias,
const std::string &  command 
)

Definition at line 1175 of file preferences.cpp.

References config::child_or_add(), and preferences_.

Referenced by events::console_handler::do_set_alias().

◆ add_completed_campaign()

void prefs::add_completed_campaign ( const std::string &  campaign_id,
const std::string &  difficulty_level 
)

Definition at line 1860 of file preferences.cpp.

References completed_campaigns_.

Referenced by campaign_controller::play_game().

◆ add_recent_files_entry()

void prefs::add_recent_files_entry ( const std::string &  path)

Adds an entry to the recent files list.

Definition at line 1632 of file preferences.cpp.

References do_commit_editor_mru(), do_read_editor_mru(), editor_mru_limit(), game_config::path, and gui2::dialogs::tip::remove().

Referenced by editor::map_context::add_to_recent_files().

◆ addon_manager_saved_order_direction()

sort_order::type prefs::addon_manager_saved_order_direction ( )

◆ addon_manager_saved_order_name()

std::string prefs::addon_manager_saved_order_name ( )

Definition at line 1233 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::addon_manager::pre_show().

◆ aes_decrypt()

preferences::secure_buffer prefs::aes_decrypt ( const preferences::secure_buffer text,
const preferences::secure_buffer key 
)
private

Same as aes_encrypt(), except of course it takes encrypted data as an argument and returns decrypted data.

Definition at line 2972 of file preferences.cpp.

References DBG_CFG, ERR_CFG, i, and utils::join().

Referenced by load_credentials(), and password().

◆ aes_encrypt()

preferences::secure_buffer prefs::aes_encrypt ( const preferences::secure_buffer text,
const preferences::secure_buffer key 
)
private

Encrypts the value of text using key and a hard coded IV using AES.

Max size of text must not be larger than 1008 bytes.

NOTE: This is not meant to provide strong protections against a determined attacker. This is meant to hide the passwords from malware scanning files for passwords, family/friends poking around, etc.

Parameters
textThe original unencrypted data.
keyThe value to use to encrypt the data. See build_key() for key generation.
Returns
secure_buffer The encrypted data.

Definition at line 2884 of file preferences.cpp.

References DBG_CFG, ERR_CFG, i, and utils::join().

Referenced by save_credentials(), and set_password().

◆ all_attributes()

std::set< std::string > prefs::all_attributes ( )

Definition at line 219 of file preferences.cpp.

References config::attribute_range(), and preferences_.

◆ allied_color()

std::string prefs::allied_color ( )

◆ allow_observers()

bool prefs::allow_observers ( )

Definition at line 2022 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::allow_observers_default().

◆ animate_map()

bool prefs::animate_map ( )

◆ animate_water()

bool prefs::animate_water ( )

◆ ask_delete_saves()

bool prefs::ask_delete_saves ( )

Definition at line 2359 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::get_dont_ask_again().

◆ auto_open_whisper_windows()

bool prefs::auto_open_whisper_windows ( )

Definition at line 1495 of file preferences.cpp.

References preferences_.

Referenced by gui2::chatbox::add_whisper_received().

◆ auto_pixel_scale()

bool prefs::auto_pixel_scale ( )

Definition at line 677 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ autosavemax()

int prefs::autosavemax ( )

Definition at line 2374 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ bell_volume()

int prefs::bell_volume ( )

Definition at line 887 of file preferences.cpp.

References gui2::dialogs::bell_volume(), and preferences_.

Referenced by gui2::dialogs::bell_volume(), and set_bell_volume().

◆ blindfold_replay()

bool prefs::blindfold_replay ( )

Definition at line 2148 of file preferences.cpp.

References preferences_.

◆ build_key()

preferences::secure_buffer prefs::build_key ( const std::string &  server,
const std::string &  login 
)
private

Fills a secure_buffer with 32 bytes of deterministically generated bytes, then overwrites it with the system login name, server login name, and server name.

If this is more than 32 bytes, then it's truncated. If it's less than 32 bytes, then the pre-generated bytes are used to pad it.

Parameters
serverThe server being logged into.
loginThe username being used to login.
Returns
secure_buffer The data to be used as the encryption key.

Definition at line 2872 of file preferences.cpp.

References get_system_username(), i, and login().

Referenced by load_credentials(), password(), save_credentials(), and set_password().

◆ builtin_servers_list()

const std::vector< game_config::server_info > & prefs::builtin_servers_list ( )

Definition at line 1928 of file preferences.cpp.

References game_config::server_list.

Referenced by network_host().

◆ campaign_server()

std::string prefs::campaign_server ( )

◆ chat_lines()

int prefs::chat_lines ( )

◆ chat_message_aging()

int prefs::chat_message_aging ( )

Definition at line 2462 of file preferences.cpp.

References preferences_.

Referenced by display_chat_manager::prune_chat_messages().

◆ chat_timestamping()

bool prefs::chat_timestamping ( )

◆ clear_countdown_action_bonus()

void prefs::clear_countdown_action_bonus ( )

◆ clear_countdown_init_time()

void prefs::clear_countdown_init_time ( )

◆ clear_countdown_reservoir_time()

void prefs::clear_countdown_reservoir_time ( )

◆ clear_countdown_turn_bonus()

void prefs::clear_countdown_turn_bonus ( )

◆ clear_credentials()

void prefs::clear_credentials ( )
private

Definition at line 418 of file preferences.cpp.

References credentials_, and draw::fill().

Referenced by load_credentials(), set_password(), and set_remember_password().

◆ clear_hotkeys()

void prefs::clear_hotkeys ( )

◆ clear_mp_alert_prefs()

void prefs::clear_mp_alert_prefs ( )

◆ clear_preferences()

void prefs::clear_preferences ( )
inlineprivate

Definition at line 828 of file preferences.hpp.

References config::clear(), and preferences_.

Referenced by reload_preferences().

◆ confirm_load_save_from_different_version()

bool prefs::confirm_load_save_from_different_version ( )

Definition at line 1203 of file preferences.cpp.

References preferences_.

◆ confirm_no_moves()

bool prefs::confirm_no_moves ( )

Definition at line 2519 of file preferences.cpp.

References config::empty(), and preferences_.

Referenced by events::menu_handler::end_turn().

◆ core_id()

std::string prefs::core_id ( )

◆ countdown()

bool prefs::countdown ( )

Definition at line 2158 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::mp_countdown_default().

◆ countdown_action_bonus()

int prefs::countdown_action_bonus ( )

Definition at line 2213 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::mp_countdown_action_bonus_default().

◆ countdown_init_time()

int prefs::countdown_init_time ( )

Definition at line 2168 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::mp_countdown_init_time_default().

◆ countdown_reservoir_time()

int prefs::countdown_reservoir_time ( )

Definition at line 2183 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::mp_countdown_reservoir_time_default().

◆ countdown_turn_bonus()

int prefs::countdown_turn_bonus ( )

Definition at line 2198 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::mp_countdown_turn_bonus_default().

◆ custom_command()

std::string prefs::custom_command ( )

Definition at line 2487 of file preferences.cpp.

References preferences_.

◆ damage_prediction_allow_monte_carlo_simulation()

bool prefs::damage_prediction_allow_monte_carlo_simulation ( )

Definition at line 1223 of file preferences.cpp.

References preferences_.

Referenced by combatant::fight().

◆ default_dir()

std::string prefs::default_dir ( )

◆ delete_saves()

bool prefs::delete_saves ( )

Definition at line 2349 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ dir_bookmarks()

optional_const_config prefs::dir_bookmarks ( )

Definition at line 1480 of file preferences.cpp.

References get_child().

◆ disable_auto_moves()

bool prefs::disable_auto_moves ( )

Definition at line 1213 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ disable_preferences_save()

static void prefs::disable_preferences_save ( )
inlinestatic

Definition at line 792 of file preferences.hpp.

References no_preferences_save.

Referenced by game_launcher::game_launcher().

◆ do_commit_editor_mru()

void prefs::do_commit_editor_mru ( const std::vector< std::string > &  mru)

Definition at line 1605 of file preferences.cpp.

References config::add_child(), editor_mru_limit(), n, and set_child().

Referenced by add_recent_files_entry().

◆ do_read_editor_mru()

std::vector< std::string > prefs::do_read_editor_mru ( )

Definition at line 1583 of file preferences.cpp.

References config::child_range(), editor_mru_limit(), and get_child().

Referenced by add_recent_files_entry(), and recent_files().

◆ draw_delay()

int prefs::draw_delay ( )

◆ editor_auto_update_transitions()

int prefs::editor_auto_update_transitions ( )

Definition at line 1540 of file preferences.cpp.

References preferences_, and pref_constants::TRANSITION_UPDATE_PARTIAL.

◆ editor_chosen_addon()

std::string prefs::editor_chosen_addon ( )
Returns
The most recently selected add-on id from the editor. May be an empty string.

Definition at line 1452 of file preferences.cpp.

References preferences_.

◆ editor_draw_hex_coordinates()

bool prefs::editor_draw_hex_coordinates ( )

Definition at line 1556 of file preferences.cpp.

References preferences_.

◆ editor_draw_num_of_bitmaps()

bool prefs::editor_draw_num_of_bitmaps ( )

Definition at line 1564 of file preferences.cpp.

References preferences_.

◆ editor_draw_terrain_codes()

bool prefs::editor_draw_terrain_codes ( )

Definition at line 1548 of file preferences.cpp.

References preferences_.

◆ editor_mru_limit()

std::size_t prefs::editor_mru_limit ( )

Definition at line 1572 of file preferences.cpp.

References preferences_.

Referenced by add_recent_files_entry(), do_commit_editor_mru(), and do_read_editor_mru().

◆ ellipses()

bool prefs::ellipses ( )

Definition at line 813 of file preferences.cpp.

References preferences_.

◆ enable_mouse_scroll()

void prefs::enable_mouse_scroll ( bool  value)

Definition at line 1059 of file preferences.cpp.

References preferences_.

Referenced by hotkey::command_executor::execute_command_wrap().

◆ enable_whiteboard_mode_on_start()

bool prefs::enable_whiteboard_mode_on_start ( )

Definition at line 1997 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ encounter_all_content()

void prefs::encounter_all_content ( const game_board gb)

◆ encounter_map_terrain()

void prefs::encounter_map_terrain ( const gamemap map)

◆ encounter_recallable_units()

void prefs::encounter_recallable_units ( const std::vector< team > &  teams)

Definition at line 2541 of file preferences.cpp.

References encountered_units_set_, and t.

Referenced by encounter_all_content().

◆ encounter_recruitable_units()

void prefs::encounter_recruitable_units ( const std::vector< team > &  teams)

Definition at line 2526 of file preferences.cpp.

References encountered_units_set_.

Referenced by encounter_all_content().

◆ encounter_start_units()

void prefs::encounter_start_units ( const unit_map units)

Definition at line 2534 of file preferences.cpp.

References encountered_units_set_.

Referenced by encounter_all_content().

◆ encountered_terrains()

std::set< t_translation::terrain_code > & prefs::encountered_terrains ( )

◆ encountered_units()

std::set< std::string > & prefs::encountered_units ( )

◆ enemy_color()

std::string prefs::enemy_color ( )

◆ era()

std::string prefs::era ( )

Definition at line 2258 of file preferences.cpp.

References preferences_.

◆ escape()

preferences::secure_buffer prefs::escape ( const preferences::secure_buffer text)
private

Definition at line 3090 of file preferences.cpp.

References c.

Referenced by save_credentials().

◆ fi_blocked_in_game()

bool prefs::fi_blocked_in_game ( )

Definition at line 1530 of file preferences.cpp.

References preferences_.

◆ fi_friends_in_game()

bool prefs::fi_friends_in_game ( )

Definition at line 1520 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_lobby::mp_lobby().

◆ fi_invert()

bool prefs::fi_invert ( )

Definition at line 1500 of file preferences.cpp.

References preferences_.

◆ fi_vacant_slots()

bool prefs::fi_vacant_slots ( )

Definition at line 1510 of file preferences.cpp.

References preferences_.

◆ fog()

bool prefs::fog ( )

Definition at line 2082 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::fog_game_default().

◆ font_scaled()

int prefs::font_scaled ( int  size)

◆ font_scaling()

int prefs::font_scaling ( )

◆ friend_message_lobby()

bool prefs::friend_message_lobby ( )

Definition at line 2660 of file preferences.cpp.

References preferences_.

◆ friend_message_notif()

bool prefs::friend_message_notif ( )

Definition at line 2652 of file preferences.cpp.

References preferences_.

◆ friend_message_sound()

bool prefs::friend_message_sound ( )

Definition at line 2644 of file preferences.cpp.

References preferences_.

◆ fullscreen()

bool prefs::fullscreen ( )

Definition at line 692 of file preferences.cpp.

References preferences_.

Referenced by video::init_window(), and maximized().

◆ game_created_lobby()

bool prefs::game_created_lobby ( )

Definition at line 2810 of file preferences.cpp.

References preferences_.

◆ game_created_notif()

bool prefs::game_created_notif ( )

Definition at line 2802 of file preferences.cpp.

References desktop::notifications::available(), and preferences_.

◆ game_created_sound()

bool prefs::game_created_sound ( )

Definition at line 2794 of file preferences.cpp.

References preferences_.

◆ game_has_begun_lobby()

bool prefs::game_has_begun_lobby ( )

Definition at line 2760 of file preferences.cpp.

References preferences_.

◆ game_has_begun_notif()

bool prefs::game_has_begun_notif ( )

Definition at line 2752 of file preferences.cpp.

References desktop::notifications::available(), and preferences_.

◆ game_has_begun_sound()

bool prefs::game_has_begun_sound ( )

Definition at line 2744 of file preferences.cpp.

References preferences_.

◆ get() [1/2]

static prefs& prefs::get ( )
inlinestatic

Definition at line 190 of file preferences.hpp.

Referenced by achievement::achievement(), achievement_group::achievement_group(), ad_hoc_addon_fetch_session(), replay::add_chat_log_entry(), events::menu_handler::add_chat_message(), display_chat_manager::add_chat_message(), gui2::chatbox::add_chat_room_message_received(), events::chat_handler::add_chat_room_message_sent(), gui2::chatbox::add_chat_room_message_sent(), gui2::dialogs::preferences_dialog::add_friend_list_entry(), help::help_text_area::add_text_item(), gui2::dialogs::lobby_player_info::add_to_friends_button_callback(), gui2::dialogs::lobby_player_info::add_to_ignores_button_callback(), editor::map_context::add_to_recent_files(), unit_creator::add_unit(), gui2::chatbox::add_whisper_received(), gui2::chatbox::add_whisper_sent(), gui2::dialogs::addon_auth::addon_auth(), advance_unit(), ng::configure_engine::allow_observers_default(), gui2::chatbox::append_to_chatbox(), unit::apply_builtin_effect(), gui2::dialogs::preferences_dialog::apply_pixel_scale(), playsingle_controller::before_human_turn(), gui2::dialogs::bell_volume(), gui2::dialogs::title_screen::button_callback_cores(), gui2::dialogs::title_screen::button_callback_multiplayer(), gui2::dialogs::campaign_selection::campaign_selected(), game_board::change_terrain(), gui2::chatbox::chat_input_keypress_callback(), savegame::loadgame::check_version_compatibility(), gui::floating_textbox::close(), ng::create_engine::create_engine(), events::menu_handler::custom_command(), gui2::dialogs::preferences_dialog::default_hotkey_callback(), gui2::dialogs::game_load::delete_button_callback(), addons_client::delete_remote_addon(), deprecated_message(), help::description_type(), display::display(), play_controller::do_autosave(), play_controller::do_consolesave(), events::console_handler::do_custom(), events::console_handler::do_discover(), events::console_handler::do_droid(), ai::move_result::do_execute(), ai::recall_result::do_execute(), ai::recruit_result::do_execute(), hotkey::command_executor::do_execute_command(), editor::editor_controller::do_execute_command(), events::console_handler::do_fps(), events::chat_command_handler::do_friend(), events::chat_command_handler::do_ignore(), events::chat_command_handler::do_remove(), do_replay_handle(), events::console_handler::do_set_alias(), events::console_handler::do_theme(), events::console_handler::do_undiscover(), display::draw(), display::draw_hex(), display::draw_minimap_units(), events::menu_handler::end_turn(), hotkey::command_executor::execute_command_wrap(), editor::context_manager::expand_load_mru_menu(), gui2::dialogs::mp_join_game::fetch_game_config(), combatant::fight(), game_display::float_label(), ng::configure_engine::fog_game_default(), foreach_autosave(), gui2::dialogs::format_addon_time(), savegame::save_info::format_time_local(), utils::format_time_summary(), mp::ui_alerts::friend_message(), game_config_manager::game_config_manager(), mp::ui_alerts::game_created(), mp::ui_alerts::game_has_begun(), game_launcher::game_launcher(), ng::configure_engine::game_name_default(), gui2::dialogs::mp_join_game::generate_side_list(), help::generate_terrain_sections(), preferences_dialog_friend::get(), play_controller::hotkey_handler::get_action_state(), editor::editor_controller::get_action_state(), gui2::dialogs::get_do_not_show_again(), gui2::dialogs::get_dont_ask_again(), draw_manager::get_frame_length(), gui2::text_history::get_history(), get_locale(), gui2::get_mp_tooltip(), orb_status_helper::get_orb_color(), mp::user_info::get_relation(), gui2::dialogs::preferences_dialog::handle_gui2_theme_select(), controller_base::handle_scroll(), gui2::dialogs::preferences_dialog::handle_theme_select(), sound::music_muter::handle_window_event(), wesnothd_connection::handshake(), impl_audio_get(), impl_audio_set(), impl_music_get(), impl_music_set(), impl_preferences_dir(), gui2::init(), play_controller::init(), game_state::init(), game_config_manager::init_game_config(), editor::editor_controller::init_gui(), events::console_handler::init_map(), sound::init_sound(), video::init_window(), gui2::dialogs::preferences_dialog::initialize_callbacks(), intf_add_known_unit(), game_lua_kernel::intf_has_achievement(), game_lua_kernel::intf_has_sub_achievement(), game_lua_kernel::intf_progress_achievement(), game_lua_kernel::intf_set_achievement(), game_lua_kernel::intf_set_sub_achievement(), display::invalidate_animations(), game_config_manager::load_addons_cfg(), game_config_manager::load_game_config(), editor::context_manager::load_mru_item(), gui2::dialogs::mp_login::load_password(), login(), manage_addons(), wb::manager::manager(), ng::campaign::mark_if_completed(), countdown_clock::maybe_play_sound(), migrate_preferences(), events::mouse_handler_base::mouse_press(), events::mouse_handler_base::mouse_wheel(), actions::move_unit_and_record(), gui2::dialogs::mp_connect::mp_connect(), ng::configure_engine::mp_countdown_action_bonus_default(), ng::configure_engine::mp_countdown_default(), ng::configure_engine::mp_countdown_init_time_default(), ng::configure_engine::mp_countdown_reservoir_time_default(), ng::configure_engine::mp_countdown_turn_bonus_default(), gui2::dialogs::mp_create_game::mp_create_game(), gui2::dialogs::mp_lobby::mp_lobby(), gui2::dialogs::mp_login::mp_login(), gui2::dialogs::mp_options_helper::mp_options_helper(), gui2::dialogs::music_on(), gui2::dialogs::music_volume(), ng::side_engine::new_config(), ng::configure_engine::num_turns_default(), gui2::dialogs::preferences_dialog::on_advanced_prefs_list_select(), gui2::dialogs::preferences_dialog::on_friends_list_select(), wb::manager::on_init_side(), gui2::dialogs::addon_manager::on_order_changed(), gui2::dialogs::mp_connect::on_server_add(), gui2::dialogs::mp_connect::on_server_delete(), help::unit_topic_generator::operator()(), ng::configure_engine::options_default(), gui2::dialogs::addon_manager::order_addons(), actions::place_recruit(), sound::play_bell(), campaign_controller::play_game(), playsingle_controller::play_human_turn(), playmp_controller::play_human_turn(), game_launcher::play_multiplayer(), sound::play_new_music(), playsingle_controller::play_scenario(), sound::play_sound(), sound::play_sound_positioned(), sound::play_timer(), sound::play_UI_sound(), mp::ui_alerts::player_joins(), mp::ui_alerts::player_leaves(), gui2::player_list_helper::player_list_helper(), gui2::dialogs::editor_choose_addon::populate_list(), unit_creator::post_create(), gui2::dialogs::preferences_dialog::post_show(), gui2::dialogs::achievements_dialog::post_show(), gui2::dialogs::campaign_selection::post_show(), gui2::dialogs::editor_choose_addon::post_show(), gui2::dialogs::language_selection::post_show(), gui2::dialogs::migrate_version_selection::post_show(), gui2::dialogs::mp_create_game::post_show(), gui2::dialogs::mp_join_game::post_show(), gui2::dialogs::mp_method_selection::post_show(), gui2::dialogs::select_orb_colors::post_show(), gui2::dialogs::addon_manager::pre_show(), gui2::dialogs::campaign_difficulty::pre_show(), gui2::dialogs::mp_lobby::pre_show(), gui2::dialogs::mp_change_control::pre_show(), gui2::dialogs::mp_create_game::pre_show(), gui2::dialogs::mp_method_selection::pre_show(), gui2::dialogs::select_orb_colors::pre_show(), orb_status_helper::prefs_show_orb(), image::prep_minimap_for_rendering(), mp::ui_alerts::private_message(), sound::music_thinker::process(), gui2::chatbox::process_message(), playmp_controller::process_network_data_impl(), gui2::dialogs::faction_select::profile_button_callback(), display_chat_manager::prune_chat_messages(), mp::ui_alerts::public_message(), gui2::dialogs::addon_manager::publish_addon(), events::pump(), sound::driver_status::query(), ng::configure_engine::random_faction_mode_default(), ng::configure_engine::random_start_time_default(), mp::ui_alerts::ready_for_start(), ng::side_engine::ready_for_start(), terrain_builder::tile::rebuild_cache(), unit_drawer::redraw_unit(), gui2::dialogs::preferences_dialog::remove_friend_list_entry(), gui2::dialogs::lobby_player_info::remove_from_list_button_callback(), REPORT_GENERATOR(), events::menu_handler::request_control_change(), sound::reset_sound(), gui2::dialogs::mp_create_game::reset_timer_settings(), gui2::dialogs::revert_to_default_pref_values(), play_controller::save_game(), play_controller::save_game_auto(), gui2::dialogs::mp_login::save_password(), play_controller::save_replay(), play_controller::save_replay_auto(), display::scroll_to_xy(), gui2::chatbox::send_chat_message(), events::menu_handler::send_chat_message(), events::chat_handler::send_chat_room_message(), ng::connect_engine::send_level_data(), events::chat_handler::send_whisper(), mp::ui_alerts::server_message(), preferences_dialog_friend::set(), gui2::dialogs::set_bell_volume(), gui2::dialogs::set_do_not_show_again(), gui2::dialogs::set_dont_ask_again(), font::pango_text::set_font_size(), video::set_fullscreen(), gui2::dialogs::preferences_dialog::set_gui2_theme_list(), gui2::dialogs::set_music(), gui2::dialogs::set_music_volume(), ng::configure_engine::set_options(), video::set_resolution(), unit_animation_component::set_selecting(), gui2::dialogs::set_sound(), gui2::dialogs::set_sound_volume(), unit_animation_component::set_standing(), gui2::dialogs::preferences_dialog::set_theme_list(), gui2::dialogs::set_turn_bell(), gui2::dialogs::set_ui_sound(), gui2::dialogs::set_ui_volume(), editor::context_manager::set_update_transitions_mode(), display::set_zoom(), events::menu_handler::shout(), gui2::dialogs::mp_join_game::show_flg_select(), playsingle_controller::show_turn_dialog(), help::show_with_toplevel(), ng::configure_engine::shroud_game_default(), gui2::tip_of_the_day::shuffle(), ng::configure_engine::shuffle_sides_default(), gui2::dialogs::mp_lobby::skip_replay_changed_callback(), gui2::dialogs::sound_on(), gui2::dialogs::sound_volume(), events::menu_handler::speak(), mp::start_local_game(), mp::start_local_game_commandline(), game_launcher::start_wesnothd(), gui2::dialogs::chat_log::model::stream_log(), SYNCED_COMMAND_HANDLER_FUNCTION(), play_controller::tab(), game_classification::to_config(), play_controller::hotkey_handler::toggle_accelerated_speed(), events::menu_handler::toggle_ellipses(), video::toggle_fullscreen(), events::menu_handler::toggle_grid(), editor::editor_controller::toggle_grid(), editor::context_manager::toggle_update_transitions(), display::turbo_speed(), gui2::dialogs::turn_bell(), mp::ui_alerts::turn_changed(), gui2::dialogs::ui_sound_on(), gui2::dialogs::ui_volume(), unit_display::unit_attack(), unit_display::unit_die(), unit_display::unit_draw_weapon(), unit_moves(), unit_display::unit_sheath_weapon(), display::update(), display::update_fps_count(), video::update_framebuffer(), gui2::player_list_helper::update_list(), ng::configure_engine::use_map_settings_default(), ng::configure_engine::village_gold_default(), ng::configure_engine::village_support_default(), events::menu_handler::whisper(), savegame::save_index_class::write_save_index(), and ng::configure_engine::xp_modifier_default().

◆ get() [2/2]

std::string prefs::get ( const std::string &  key,
const std::string &  def 
)
private

Definition at line 508 of file preferences.cpp.

References config::empty(), and preferences_.

◆ get_acquaintances()

const std::map< std::string, preferences::acquaintance > & prefs::get_acquaintances ( )

◆ get_acquaintances_nice()

std::map< std::string, std::string > prefs::get_acquaintances_nice ( const std::string &  filter)

Definition at line 1791 of file preferences.cpp.

References a, and acquaintances_.

Referenced by play_controller::tab().

◆ get_advanced_preferences()

std::vector<preferences::option>& prefs::get_advanced_preferences ( )
inline

◆ get_alias()

optional_const_config prefs::get_alias ( )

Definition at line 1182 of file preferences.cpp.

References get_child().

◆ get_as_attribute()

config::attribute_value prefs::get_as_attribute ( const std::string &  key)
private

Definition at line 512 of file preferences.cpp.

References preferences_.

◆ get_chat_timestamp()

std::string prefs::get_chat_timestamp ( const std::time_t &  t)

◆ get_child()

optional_const_config prefs::get_child ( const std::string &  key)
private

◆ get_history()

std::vector< std::string > * prefs::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.

Todo:
FIXME only used for gui2. Could be used for the above histories.

Definition at line 2503 of file preferences.cpp.

References history_map_, and id.

Referenced by gui2::text_history::get_history().

◆ get_ignored_delim()

const std::string prefs::get_ignored_delim ( )

Definition at line 1777 of file preferences.cpp.

References acquaintances_, and utils::join().

Referenced by ng::connect_engine::send_level_data().

◆ get_lobby_joins()

pref_constants::lobby_joins prefs::get_lobby_joins ( )

◆ get_mp_server_program_name()

std::string prefs::get_mp_server_program_name ( )

Definition at line 1767 of file preferences.cpp.

References preferences_.

Referenced by show_wesnothd_server_search(), and game_launcher::start_wesnothd().

◆ get_scroll_when_mouse_outside()

bool prefs::get_scroll_when_mouse_outside ( bool  def)

Definition at line 1471 of file preferences.cpp.

References preferences_.

Referenced by controller_base::handle_scroll().

◆ get_show_deprecation()

bool prefs::get_show_deprecation ( bool  def)

Definition at line 1466 of file preferences.cpp.

References preferences_.

◆ get_system_username()

std::string prefs::get_system_username ( )
private

Definition at line 2853 of file preferences.cpp.

References login(), and utf8::size().

Referenced by build_key(), load_credentials(), login(), and save_credentials().

◆ green_confirm()

bool prefs::green_confirm ( )

Definition at line 2508 of file preferences.cpp.

References preferences_.

◆ grid()

bool prefs::grid ( )

◆ gui_theme()

std::string prefs::gui_theme ( )

Definition at line 803 of file preferences.cpp.

References preferences_.

Referenced by gui2::init(), and gui2::dialogs::preferences_dialog::set_gui2_theme_list().

◆ hide_whiteboard()

bool prefs::hide_whiteboard ( )

Definition at line 2007 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ idle_anim()

bool prefs::idle_anim ( )

Definition at line 773 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ idle_anim_rate()

int prefs::idle_anim_rate ( )

Definition at line 783 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ interrupt_when_ally_sighted()

bool prefs::interrupt_when_ally_sighted ( )

◆ is_campaign_completed() [1/2]

bool prefs::is_campaign_completed ( const std::string &  campaign_id)

Definition at line 1865 of file preferences.cpp.

References completed_campaigns_.

Referenced by ng::campaign::mark_if_completed().

◆ is_campaign_completed() [2/2]

bool prefs::is_campaign_completed ( const std::string &  campaign_id,
const std::string &  difficulty_level 
)

Definition at line 1870 of file preferences.cpp.

References completed_campaigns_.

◆ is_friend()

bool prefs::is_friend ( const std::string &  nick)

◆ is_ignored()

bool prefs::is_ignored ( const std::string &  nick)

◆ keepalive_timeout() [1/2]

int prefs::keepalive_timeout ( )

Definition at line 763 of file preferences.cpp.

References preferences_.

Referenced by wesnothd_connection::handshake().

◆ keepalive_timeout() [2/2]

void prefs::keepalive_timeout ( int  seconds)

Definition at line 768 of file preferences.cpp.

References preferences_.

◆ language()

std::string prefs::language ( )

Definition at line 793 of file preferences.cpp.

References preferences_.

Referenced by get_locale().

◆ last_cache_cleared_version()

std::string prefs::last_cache_cleared_version ( )

Definition at line 1461 of file preferences.cpp.

References preferences_.

◆ level()

std::string prefs::level ( )

Definition at line 2268 of file preferences.cpp.

References preferences_.

◆ level_type()

int prefs::level_type ( )

Definition at line 2278 of file preferences.cpp.

References preferences_.

◆ load_advanced_prefs()

void prefs::load_advanced_prefs ( const game_config_view gc)

◆ load_credentials()

void prefs::load_credentials ( )
private

◆ load_hotkeys()

void prefs::load_hotkeys ( )

◆ load_preferences()

void prefs::load_preferences ( )
private

◆ login()

std::string prefs::login ( )

◆ maximized()

bool prefs::maximized ( )

Definition at line 687 of file preferences.cpp.

References fullscreen(), and preferences_.

◆ message_bell()

bool prefs::message_bell ( )

Definition at line 975 of file preferences.cpp.

References preferences_.

Referenced by do_replay_handle(), and playmp_controller::process_network_data_impl().

◆ message_private()

bool prefs::message_private ( )

Definition at line 2394 of file preferences.cpp.

References message_private_on_.

◆ middle_click_scrolls()

bool prefs::middle_click_scrolls ( )

Definition at line 1049 of file preferences.cpp.

References preferences_.

◆ migrate_preferences()

void prefs::migrate_preferences ( const std::string &  prefs_dir)

◆ minimap_draw_terrain()

bool prefs::minimap_draw_terrain ( )

Definition at line 1119 of file preferences.cpp.

References preferences_.

Referenced by image::prep_minimap_for_rendering(), and toggle_minimap_draw_terrain().

◆ minimap_draw_units()

bool prefs::minimap_draw_units ( )

Definition at line 1099 of file preferences.cpp.

References preferences_.

Referenced by image::prep_minimap_for_rendering(), and toggle_minimap_draw_units().

◆ minimap_draw_villages()

bool prefs::minimap_draw_villages ( )

Definition at line 1109 of file preferences.cpp.

References preferences_.

Referenced by image::prep_minimap_for_rendering(), and toggle_minimap_draw_villages().

◆ minimap_movement_coding()

bool prefs::minimap_movement_coding ( )

Definition at line 1079 of file preferences.cpp.

References preferences_.

Referenced by image::prep_minimap_for_rendering(), and toggle_minimap_movement_coding().

◆ minimap_terrain_coding()

bool prefs::minimap_terrain_coding ( )

Definition at line 1089 of file preferences.cpp.

References preferences_.

Referenced by image::prep_minimap_for_rendering(), and toggle_minimap_terrain_coding().

◆ modifications()

const std::vector< std::string > & prefs::modifications ( bool  mp = true)

◆ mouse_scroll_enabled()

bool prefs::mouse_scroll_enabled ( )

Definition at line 1054 of file preferences.cpp.

References preferences_.

Referenced by controller_base::handle_scroll().

◆ mouse_scroll_threshold()

int prefs::mouse_scroll_threshold ( )

Gets the threshold for when to scroll.

This scrolling happens when the mouse is in the application and near the border.

Definition at line 1064 of file preferences.cpp.

References preferences_.

Referenced by controller_base::handle_scroll().

◆ moved_color()

std::string prefs::moved_color ( )

◆ mp_server_warning_disabled()

int prefs::mp_server_warning_disabled ( )

Definition at line 2062 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::get_do_not_show_again().

◆ music_on()

bool prefs::music_on ( )

◆ music_volume()

int prefs::music_volume ( )

◆ network_host()

std::string prefs::network_host ( )

◆ operator=() [1/2]

prefs& prefs::operator= ( const prefs &&  p)
privatedelete

◆ operator=() [2/2]

prefs& prefs::operator= ( const prefs p)
privatedelete

◆ options()

const config & prefs::options ( )

◆ parse_should_show_lobby_join()

bool prefs::parse_should_show_lobby_join ( const std::string &  sender,
const std::string &  message 
)

◆ partial_color()

std::string prefs::partial_color ( )

◆ password()

std::string prefs::password ( const std::string &  server,
const std::string &  login 
)

◆ pixel_scale()

int prefs::pixel_scale ( )

◆ player_joins_lobby()

bool prefs::player_joins_lobby ( )

Definition at line 2585 of file preferences.cpp.

References preferences_.

◆ player_joins_notif()

bool prefs::player_joins_notif ( )

Definition at line 2577 of file preferences.cpp.

References preferences_.

◆ player_joins_sound()

bool prefs::player_joins_sound ( )

Definition at line 2569 of file preferences.cpp.

References preferences_.

◆ player_leaves_lobby()

bool prefs::player_leaves_lobby ( )

Definition at line 2610 of file preferences.cpp.

References preferences_.

◆ player_leaves_notif()

bool prefs::player_leaves_notif ( )

Definition at line 2602 of file preferences.cpp.

References preferences_.

◆ player_leaves_sound()

bool prefs::player_leaves_sound ( )

Definition at line 2594 of file preferences.cpp.

References preferences_.

◆ preferences_save()

static bool prefs::preferences_save ( )
inlinestatic

Definition at line 796 of file preferences.hpp.

References no_preferences_save.

◆ private_message_lobby()

bool prefs::private_message_lobby ( )

Definition at line 2635 of file preferences.cpp.

References preferences_.

◆ private_message_notif()

bool prefs::private_message_notif ( )

Definition at line 2627 of file preferences.cpp.

References desktop::notifications::available(), and preferences_.

◆ private_message_sound()

bool prefs::private_message_sound ( )

Definition at line 2619 of file preferences.cpp.

References preferences_.

◆ progress_achievement()

int prefs::progress_achievement ( const std::string &  content_for,
const std::string &  id,
int  limit = 999999,
int  max_progress = 999999,
int  amount = 0 
)

Increments the achievement's current progress by amount if it hasn't already been completed.

If you only want to check the achievement's current progress, then omit the last three arguments. amount defaults to 0, which will result in the current progress value being returned without being changed (x + 0 == x).

Note that this uses the same [in_progress] as is used for set_sub_achievement().

Parameters
content_forThe id of the achievement group this achievement is in.
idThe id for the specific achievement in the achievement group.
limitThe maximum value that a specific call to this function can increase the achievement progress value.
max_progressThe value when the achievement is considered completed.
amountThe amount to progress the achievement.
Returns
The achievement's current progress, or -1 if it has already been completed.

Definition at line 1305 of file preferences.cpp.

References achievement(), config::add_child(), config::child_range(), id, and preferences_.

Referenced by game_lua_kernel::intf_progress_achievement().

◆ public_message_lobby()

bool prefs::public_message_lobby ( )

Definition at line 2685 of file preferences.cpp.

References preferences_.

◆ public_message_notif()

bool prefs::public_message_notif ( )

Definition at line 2677 of file preferences.cpp.

References preferences_.

◆ public_message_sound()

bool prefs::public_message_sound ( )

Definition at line 2669 of file preferences.cpp.

References preferences_.

◆ random_faction_mode()

std::string prefs::random_faction_mode ( )

Definition at line 2042 of file preferences.cpp.

References preferences_.

◆ random_start_time()

bool prefs::random_start_time ( )

Definition at line 2072 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::random_start_time_default().

◆ ready_for_start_lobby()

bool prefs::ready_for_start_lobby ( )

Definition at line 2735 of file preferences.cpp.

References preferences_.

◆ ready_for_start_notif()

bool prefs::ready_for_start_notif ( )

Definition at line 2727 of file preferences.cpp.

References desktop::notifications::available(), and preferences_.

◆ ready_for_start_sound()

bool prefs::ready_for_start_sound ( )

Definition at line 2719 of file preferences.cpp.

References preferences_.

◆ recent_files()

std::vector< std::string > prefs::recent_files ( )

Retrieves the list of recently opened files.

Definition at line 1627 of file preferences.cpp.

References do_read_editor_mru().

Referenced by editor::context_manager::expand_load_mru_menu(), and editor::context_manager::load_mru_item().

◆ reload_preferences()

void prefs::reload_preferences ( )

◆ remember_password()

bool prefs::remember_password ( )

◆ remove_acquaintance()

bool prefs::remove_acquaintance ( const std::string &  nick)

◆ resolution()

point prefs::resolution ( )

◆ sample_rate()

unsigned int prefs::sample_rate ( )

Definition at line 1187 of file preferences.cpp.

References preferences_.

Referenced by save_sample_rate().

◆ save_compression_format()

compression::format prefs::save_compression_format ( )

Definition at line 2404 of file preferences.cpp.

References compression::bzip2, compression::gzip, compression::none, and preferences_.

Referenced by foreach_autosave().

◆ save_credentials()

void prefs::save_credentials ( )
private

◆ save_hotkeys()

void prefs::save_hotkeys ( )

Definition at line 1164 of file preferences.cpp.

References preferences_, and hotkey::save_hotkeys().

Referenced by gui2::dialogs::preferences_dialog::post_show().

◆ save_replays()

bool prefs::save_replays ( )

Definition at line 2339 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ save_sample_rate()

void prefs::save_sample_rate ( const unsigned int  rate)

Definition at line 1192 of file preferences.cpp.

References preferences_, sound::reset_sound(), and sample_rate().

◆ save_sound_buffer_size()

void prefs::save_sound_buffer_size ( const std::size_t  size)

Definition at line 846 of file preferences.cpp.

References preferences_, sound::reset_sound(), and utf8::size().

◆ scroll_speed()

int prefs::scroll_speed ( )

◆ scroll_to_action()

bool prefs::scroll_to_action ( )

Definition at line 640 of file preferences.cpp.

References preferences_.

◆ selected_achievement_group()

std::string prefs::selected_achievement_group ( )

Definition at line 1253 of file preferences.cpp.

References preferences_.

◆ server_message_lobby()

bool prefs::server_message_lobby ( )

Definition at line 2710 of file preferences.cpp.

References preferences_.

◆ server_message_notif()

bool prefs::server_message_notif ( )

Definition at line 2702 of file preferences.cpp.

References preferences_.

◆ server_message_sound()

bool prefs::server_message_sound ( )

Definition at line 2694 of file preferences.cpp.

References preferences_.

◆ set_achievement()

void prefs::set_achievement ( const std::string &  content_for,
const std::string &  id 
)

Marks the specified achievement as completed.

Parameters
content_forThe achievement group the achievement is part of.
idThe ID of the achievement within the achievement group.

Definition at line 1276 of file preferences.cpp.

References config::add_child(), config::child_range(), id, preferences_, and utils::split().

Referenced by game_lua_kernel::intf_set_achievement().

◆ set_addon_manager_saved_order_direction()

void prefs::set_addon_manager_saved_order_direction ( sort_order::type  value)

◆ set_addon_manager_saved_order_name()

void prefs::set_addon_manager_saved_order_name ( const std::string &  value)

◆ set_allied_color()

void prefs::set_allied_color ( const std::string &  color_id)

◆ set_allow_observers()

void prefs::set_allow_observers ( bool  value)

Definition at line 2027 of file preferences.cpp.

References preferences_.

◆ set_animate_map()

void prefs::set_animate_map ( bool  value)

◆ set_animate_water()

void prefs::set_animate_water ( bool  value)

Definition at line 1134 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_ask_delete_saves()

void prefs::set_ask_delete_saves ( bool  value)

Definition at line 2354 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::set_dont_ask_again().

◆ set_auto_pixel_scale()

void prefs::set_auto_pixel_scale ( bool  choice)

◆ set_autosavemax()

void prefs::set_autosavemax ( int  value)

Definition at line 2379 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_bell_volume()

void prefs::set_bell_volume ( int  vol)

◆ set_blindfold_replay()

void prefs::set_blindfold_replay ( bool  value)

Definition at line 2153 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_lobby::skip_replay_changed_callback().

◆ set_campaign_server()

void prefs::set_campaign_server ( const std::string &  host)

Definition at line 1982 of file preferences.cpp.

References preferences_.

◆ set_chat_lines()

void prefs::set_chat_lines ( int  lines)

Definition at line 2452 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_chat_message_aging()

void prefs::set_chat_message_aging ( const int  aging)

Definition at line 2457 of file preferences.cpp.

References preferences_.

◆ set_chat_timestamping()

void prefs::set_chat_timestamping ( bool  value)

Definition at line 2442 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_child()

void prefs::set_child ( const std::string &  key,
const config val 
)
private

◆ set_color_cursors()

void prefs::set_color_cursors ( bool  value)

Definition at line 1655 of file preferences.cpp.

References preferences_, and cursor::set().

◆ set_core_id()

void prefs::set_core_id ( const std::string &  root)

◆ set_countdown()

void prefs::set_countdown ( bool  value)

Definition at line 2163 of file preferences.cpp.

References preferences_.

◆ set_countdown_action_bonus()

void prefs::set_countdown_action_bonus ( int  value)

Definition at line 2218 of file preferences.cpp.

References preferences_.

◆ set_countdown_init_time()

void prefs::set_countdown_init_time ( int  value)

Definition at line 2173 of file preferences.cpp.

References preferences_.

◆ set_countdown_reservoir_time()

void prefs::set_countdown_reservoir_time ( int  value)

Definition at line 2188 of file preferences.cpp.

References preferences_.

◆ set_countdown_turn_bonus()

void prefs::set_countdown_turn_bonus ( int  value)

Definition at line 2203 of file preferences.cpp.

References preferences_.

◆ set_custom_command()

void prefs::set_custom_command ( const std::string &  command)

Definition at line 2492 of file preferences.cpp.

References preferences_.

Referenced by events::console_handler::do_custom().

◆ set_damage_prediction_allow_monte_carlo_simulation()

void prefs::set_damage_prediction_allow_monte_carlo_simulation ( bool  value)

Definition at line 1228 of file preferences.cpp.

References preferences_.

◆ set_delete_saves()

void prefs::set_delete_saves ( bool  value)

Definition at line 2344 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_dir_bookmarks()

void prefs::set_dir_bookmarks ( const config cfg)

Definition at line 1476 of file preferences.cpp.

References set_child().

◆ set_disable_auto_moves()

void prefs::set_disable_auto_moves ( bool  value)

Definition at line 1218 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_draw_delay()

void prefs::set_draw_delay ( int  value)

◆ set_editor_auto_update_transitions()

void prefs::set_editor_auto_update_transitions ( int  value)

◆ set_editor_chosen_addon()

void prefs::set_editor_chosen_addon ( const std::string &  addon_id)
Parameters
addon_idThe chosen addon id from the editor to store in the preferences.

Definition at line 1447 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::editor_choose_addon::post_show().

◆ set_editor_draw_hex_coordinates()

void prefs::set_editor_draw_hex_coordinates ( bool  value)

Definition at line 1560 of file preferences.cpp.

References preferences_.

Referenced by editor::editor_controller::do_execute_command().

◆ set_editor_draw_num_of_bitmaps()

void prefs::set_editor_draw_num_of_bitmaps ( bool  value)

Definition at line 1568 of file preferences.cpp.

References preferences_.

Referenced by editor::editor_controller::do_execute_command().

◆ set_editor_draw_terrain_codes()

void prefs::set_editor_draw_terrain_codes ( bool  value)

Definition at line 1552 of file preferences.cpp.

References preferences_.

Referenced by editor::editor_controller::do_execute_command().

◆ set_ellipses()

void prefs::set_ellipses ( bool  ison)

Definition at line 818 of file preferences.cpp.

References preferences_.

Referenced by events::menu_handler::toggle_ellipses().

◆ set_enable_whiteboard_mode_on_start()

void prefs::set_enable_whiteboard_mode_on_start ( bool  value)

Definition at line 2002 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_enemy_color()

void prefs::set_enemy_color ( const std::string &  color_id)

◆ set_era()

void prefs::set_era ( const std::string &  value)

Definition at line 2263 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_create_game::post_show().

◆ set_fi_blocked_in_game()

void prefs::set_fi_blocked_in_game ( bool  value)

Definition at line 1535 of file preferences.cpp.

References preferences_.

◆ set_fi_friends_in_game()

void prefs::set_fi_friends_in_game ( bool  value)

Definition at line 1525 of file preferences.cpp.

References preferences_.

◆ set_fi_invert()

void prefs::set_fi_invert ( bool  value)

Definition at line 1505 of file preferences.cpp.

References preferences_.

◆ set_fi_vacant_slots()

void prefs::set_fi_vacant_slots ( bool  value)

Definition at line 1515 of file preferences.cpp.

References preferences_.

◆ set_fog()

void prefs::set_fog ( bool  value)

Definition at line 2087 of file preferences.cpp.

References preferences_.

◆ set_font_scaling()

void prefs::set_font_scaling ( int  scale)

◆ set_friend_message_lobby()

void prefs::set_friend_message_lobby ( bool  val)

Definition at line 2664 of file preferences.cpp.

References preferences_.

◆ set_friend_message_notif()

void prefs::set_friend_message_notif ( bool  val)

Definition at line 2656 of file preferences.cpp.

References preferences_.

◆ set_friend_message_sound()

void prefs::set_friend_message_sound ( bool  val)

Definition at line 2648 of file preferences.cpp.

References preferences_.

◆ set_fullscreen()

void prefs::set_fullscreen ( bool  ison)

Definition at line 713 of file preferences.cpp.

References preferences_.

Referenced by video::set_fullscreen().

◆ set_game_created_lobby()

void prefs::set_game_created_lobby ( bool  val)

Definition at line 2814 of file preferences.cpp.

References preferences_.

◆ set_game_created_notif()

void prefs::set_game_created_notif ( bool  val)

Definition at line 2806 of file preferences.cpp.

References preferences_.

◆ set_game_created_sound()

void prefs::set_game_created_sound ( bool  val)

Definition at line 2798 of file preferences.cpp.

References preferences_.

◆ set_game_has_begun_lobby()

void prefs::set_game_has_begun_lobby ( bool  val)

Definition at line 2764 of file preferences.cpp.

References preferences_.

◆ set_game_has_begun_notif()

void prefs::set_game_has_begun_notif ( bool  val)

Definition at line 2756 of file preferences.cpp.

References preferences_.

◆ set_game_has_begun_sound()

void prefs::set_game_has_begun_sound ( bool  val)

Definition at line 2748 of file preferences.cpp.

References preferences_.

◆ set_grid()

void prefs::set_grid ( bool  ison)

◆ set_gui_theme()

void prefs::set_gui_theme ( const std::string &  s)

Definition at line 808 of file preferences.cpp.

References preferences_, and s.

Referenced by gui2::dialogs::preferences_dialog::handle_gui2_theme_select().

◆ set_hide_whiteboard()

void prefs::set_hide_whiteboard ( bool  value)

Definition at line 2012 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_idle_anim()

void prefs::set_idle_anim ( const bool  ison)

Definition at line 778 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_idle_anim_rate()

void prefs::set_idle_anim_rate ( int  rate)

Definition at line 788 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_interrupt_when_ally_sighted()

void prefs::set_interrupt_when_ally_sighted ( bool  value)

Definition at line 2364 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_language()

void prefs::set_language ( const std::string &  s)

Definition at line 798 of file preferences.cpp.

References preferences_, and s.

Referenced by gui2::dialogs::language_selection::post_show().

◆ set_last_cache_cleared_version()

void prefs::set_last_cache_cleared_version ( const std::string &  version)

Definition at line 1457 of file preferences.cpp.

References preferences_.

Referenced by game_config_manager::game_config_manager().

◆ set_level()

void prefs::set_level ( const std::string &  value)

Definition at line 2273 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_create_game::post_show().

◆ set_level_type()

void prefs::set_level_type ( int  value)

Definition at line 2283 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_create_game::post_show().

◆ set_lobby_joins()

void prefs::set_lobby_joins ( pref_constants::lobby_joins  show)

◆ set_login()

void prefs::set_login ( const std::string &  login)

◆ set_maximized()

void prefs::set_maximized ( bool  ison)

Definition at line 708 of file preferences.cpp.

References preferences_.

Referenced by game_launcher::game_launcher(), events::pump(), and video::set_resolution().

◆ set_message_private()

void prefs::set_message_private ( bool  value)

◆ set_modifications()

void prefs::set_modifications ( const std::vector< std::string > &  value,
bool  mp = true 
)

◆ set_moved_color()

void prefs::set_moved_color ( const std::string &  color_id)

◆ set_mp_server_program_name()

void prefs::set_mp_server_program_name ( const std::string &  path)

◆ set_mp_server_warning_disabled()

void prefs::set_mp_server_warning_disabled ( int  value)

Definition at line 2067 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::set_do_not_show_again().

◆ set_music()

bool prefs::set_music ( bool  ison)

◆ set_music_volume()

void prefs::set_music_volume ( int  vol)

◆ set_network_host()

void prefs::set_network_host ( const std::string &  host)

Definition at line 1968 of file preferences.cpp.

References preferences_.

Referenced by game_launcher::play_multiplayer().

◆ set_options()

void prefs::set_options ( const config values)

Definition at line 2132 of file preferences.cpp.

References options_initialized_, and set_child().

Referenced by ng::configure_engine::set_options().

◆ set_partial_color()

void prefs::set_partial_color ( const std::string &  color_id)

◆ set_password()

void prefs::set_password ( const std::string &  server,
const std::string &  login,
const std::string &  key 
)

◆ set_pixel_scale()

void prefs::set_pixel_scale ( const int  scale)

◆ set_player_joins_lobby()

void prefs::set_player_joins_lobby ( bool  val)

Definition at line 2589 of file preferences.cpp.

References preferences_.

◆ set_player_joins_notif()

void prefs::set_player_joins_notif ( bool  val)

Definition at line 2581 of file preferences.cpp.

References preferences_.

◆ set_player_joins_sound()

void prefs::set_player_joins_sound ( bool  val)

Definition at line 2573 of file preferences.cpp.

References preferences_.

◆ set_player_leaves_lobby()

void prefs::set_player_leaves_lobby ( bool  val)

Definition at line 2614 of file preferences.cpp.

References preferences_.

◆ set_player_leaves_notif()

void prefs::set_player_leaves_notif ( bool  val)

Definition at line 2606 of file preferences.cpp.

References preferences_.

◆ set_player_leaves_sound()

void prefs::set_player_leaves_sound ( bool  val)

Definition at line 2598 of file preferences.cpp.

References preferences_.

◆ set_private_message_lobby()

void prefs::set_private_message_lobby ( bool  val)

Definition at line 2639 of file preferences.cpp.

References preferences_.

◆ set_private_message_notif()

void prefs::set_private_message_notif ( bool  val)

Definition at line 2631 of file preferences.cpp.

References preferences_.

◆ set_private_message_sound()

void prefs::set_private_message_sound ( bool  val)

Definition at line 2623 of file preferences.cpp.

References preferences_.

◆ set_public_message_lobby()

void prefs::set_public_message_lobby ( bool  val)

Definition at line 2689 of file preferences.cpp.

References preferences_.

◆ set_public_message_notif()

void prefs::set_public_message_notif ( bool  val)

Definition at line 2681 of file preferences.cpp.

References preferences_.

◆ set_public_message_sound()

void prefs::set_public_message_sound ( bool  val)

Definition at line 2673 of file preferences.cpp.

References preferences_.

◆ set_random_faction_mode()

void prefs::set_random_faction_mode ( const std::string &  value)

Definition at line 2047 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_create_game::post_show().

◆ set_random_start_time()

void prefs::set_random_start_time ( bool  value)

Definition at line 2077 of file preferences.cpp.

References preferences_.

◆ set_ready_for_start_lobby()

void prefs::set_ready_for_start_lobby ( bool  val)

Definition at line 2739 of file preferences.cpp.

References preferences_.

◆ set_ready_for_start_notif()

void prefs::set_ready_for_start_notif ( bool  val)

Definition at line 2731 of file preferences.cpp.

References preferences_.

◆ set_ready_for_start_sound()

void prefs::set_ready_for_start_sound ( bool  val)

Definition at line 2723 of file preferences.cpp.

References preferences_.

◆ set_remember_password()

void prefs::set_remember_password ( bool  remember)

◆ set_resolution()

void prefs::set_resolution ( const point res)

Definition at line 702 of file preferences.cpp.

References preferences_.

Referenced by game_launcher::game_launcher(), events::pump(), and video::set_resolution().

◆ set_save_replays()

void prefs::set_save_replays ( bool  value)

Definition at line 2334 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_scroll_speed()

void prefs::set_scroll_speed ( const int  scroll)

Definition at line 1044 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_scroll_to_action()

void prefs::set_scroll_to_action ( bool  ison)

Definition at line 645 of file preferences.cpp.

References preferences_.

◆ set_selected_achievement_group()

void prefs::set_selected_achievement_group ( const std::string &  content_for)

Definition at line 1258 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::achievements_dialog::post_show().

◆ set_server_message_lobby()

void prefs::set_server_message_lobby ( bool  val)

Definition at line 2714 of file preferences.cpp.

References preferences_.

◆ set_server_message_notif()

void prefs::set_server_message_notif ( bool  val)

Definition at line 2706 of file preferences.cpp.

References preferences_.

◆ set_server_message_sound()

void prefs::set_server_message_sound ( bool  val)

Definition at line 2698 of file preferences.cpp.

References preferences_.

◆ set_show_all_units_in_help()

void prefs::set_show_all_units_in_help ( bool  value)

Definition at line 2472 of file preferences.cpp.

References preferences_.

◆ set_show_ally_orb()

void prefs::set_show_ally_orb ( bool  show_orb)

◆ set_show_disengaged_orb()

void prefs::set_show_disengaged_orb ( bool  show_orb)

◆ set_show_enemy_orb()

void prefs::set_show_enemy_orb ( bool  show_orb)

◆ set_show_floating_labels()

void prefs::set_show_floating_labels ( bool  value)

Definition at line 2389 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_show_fps()

void prefs::set_show_fps ( bool  value)

Definition at line 1144 of file preferences.cpp.

References fps_.

Referenced by events::console_handler::do_fps(), and game_launcher::game_launcher().

◆ set_show_moved_orb()

void prefs::set_show_moved_orb ( bool  show_orb)

◆ set_show_partial_orb()

void prefs::set_show_partial_orb ( bool  show_orb)

◆ set_show_side_colors()

void prefs::set_show_side_colors ( bool  value)

Definition at line 2324 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_show_standing_animations()

void prefs::set_show_standing_animations ( bool  value)

◆ set_show_status_on_ally_orb()

void prefs::set_show_status_on_ally_orb ( bool  show_orb)

◆ set_show_unmoved_orb()

void prefs::set_show_unmoved_orb ( bool  show_orb)

◆ set_shroud()

void prefs::set_shroud ( bool  value)

Definition at line 2097 of file preferences.cpp.

References preferences_.

◆ set_shuffle_sides()

void prefs::set_shuffle_sides ( bool  value)

Definition at line 2037 of file preferences.cpp.

References preferences_.

◆ set_skip_ai_moves()

void prefs::set_skip_ai_moves ( bool  value)

Definition at line 2319 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_skip_mp_replay()

void prefs::set_skip_mp_replay ( bool  value)

Definition at line 2143 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::mp_lobby::skip_replay_changed_callback().

◆ set_sound()

bool prefs::set_sound ( bool  ison)

◆ set_sound_volume()

void prefs::set_sound_volume ( int  vol)

◆ set_stop_music_in_background()

void prefs::set_stop_music_in_background ( bool  ison)

Definition at line 1034 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_sub_achievement()

void prefs::set_sub_achievement ( const std::string &  content_for,
const std::string &  id,
const std::string &  sub_id 
)

Marks the specified sub-achievement as completed.

Note that this uses the same [in_progress] as is used for progress_achievement().

Parameters
content_forThe achievement group the achievement is part of.
idThe ID of the achievement within the achievement group.
sub_idThe ID of the sub-achievement within the achievement.

Definition at line 1392 of file preferences.cpp.

References achievement(), config::add_child(), config::child_range(), id, preferences_, and utils::split().

Referenced by game_lua_kernel::intf_set_sub_achievement().

◆ set_theme()

void prefs::set_theme ( const std::string &  theme)

◆ set_tile_size()

void prefs::set_tile_size ( const unsigned int  size)

Definition at line 922 of file preferences.cpp.

References preferences_, utf8::size(), and game_config::tile_size.

Referenced by display::display(), and display::set_zoom().

◆ set_turbo()

void prefs::set_turbo ( bool  ison)

◆ set_turbo_speed()

void prefs::set_turbo_speed ( const double  speed)

Definition at line 742 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_turn_bell()

bool prefs::set_turn_bell ( bool  ison)

◆ set_turn_changed_lobby()

void prefs::set_turn_changed_lobby ( bool  val)

Definition at line 2789 of file preferences.cpp.

References preferences_.

◆ set_turn_changed_notif()

void prefs::set_turn_changed_notif ( bool  val)

Definition at line 2781 of file preferences.cpp.

References preferences_.

◆ set_turn_changed_sound()

void prefs::set_turn_changed_sound ( bool  val)

Definition at line 2773 of file preferences.cpp.

References preferences_.

◆ set_turn_dialog()

void prefs::set_turn_dialog ( bool  ison)

Definition at line 1992 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_turns()

void prefs::set_turns ( int  value)

Definition at line 2107 of file preferences.cpp.

References preferences_.

◆ set_ui_sound()

bool prefs::set_ui_sound ( bool  ison)

◆ set_ui_volume()

void prefs::set_ui_volume ( int  vol)

◆ set_unmoved_color()

void prefs::set_unmoved_color ( const std::string &  color_id)

◆ set_use_map_settings()

void prefs::set_use_map_settings ( bool  value)

Definition at line 2057 of file preferences.cpp.

References preferences_.

◆ set_user_servers_list()

void prefs::set_user_servers_list ( const std::vector< game_config::server_info > &  value)

◆ set_village_gold()

void prefs::set_village_gold ( int  value)

Definition at line 2233 of file preferences.cpp.

References preferences_.

◆ set_village_support()

void prefs::set_village_support ( int  value)

Definition at line 2243 of file preferences.cpp.

References preferences_.

◆ set_vsync()

void prefs::set_vsync ( bool  ison)

Definition at line 718 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_whisper_friends_only()

void prefs::set_whisper_friends_only ( bool  v)

Definition at line 1490 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ set_xp_modifier()

void prefs::set_xp_modifier ( int  value)

Definition at line 2253 of file preferences.cpp.

References preferences_.

◆ show_all_units_in_help()

bool prefs::show_all_units_in_help ( )

Definition at line 2467 of file preferences.cpp.

References preferences_.

◆ show_ally_orb()

bool prefs::show_ally_orb ( )

Definition at line 520 of file preferences.cpp.

References preferences_, and game_config::show_ally_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_combat()

bool prefs::show_combat ( )

◆ show_disengaged_orb()

bool prefs::show_disengaged_orb ( )

Definition at line 562 of file preferences.cpp.

References preferences_, and game_config::show_disengaged_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_enemy_orb()

bool prefs::show_enemy_orb ( )

Definition at line 534 of file preferences.cpp.

References preferences_, and game_config::show_enemy_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_floating_labels()

bool prefs::show_floating_labels ( )

Definition at line 2384 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ show_fps()

bool prefs::show_fps ( )

Definition at line 1139 of file preferences.cpp.

References fps_.

◆ show_moved_orb()

bool prefs::show_moved_orb ( )

Definition at line 541 of file preferences.cpp.

References preferences_, and game_config::show_moved_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_partial_orb()

bool prefs::show_partial_orb ( )

Definition at line 555 of file preferences.cpp.

References preferences_, and game_config::show_partial_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_side_colors()

bool prefs::show_side_colors ( )

◆ show_standing_animations()

bool prefs::show_standing_animations ( )

Definition at line 1662 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ show_status_on_ally_orb()

bool prefs::show_status_on_ally_orb ( )

Definition at line 527 of file preferences.cpp.

References preferences_, and game_config::show_status_on_ally_orb.

◆ show_theme_dialog()

bool prefs::show_theme_dialog ( )

◆ show_unmoved_orb()

bool prefs::show_unmoved_orb ( )

Definition at line 548 of file preferences.cpp.

References preferences_, and game_config::show_unmoved_orb.

Referenced by orb_status_helper::prefs_show_orb().

◆ show_wesnothd_server_search()

void prefs::show_wesnothd_server_search ( )

◆ shroud()

bool prefs::shroud ( )

Definition at line 2092 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::shroud_game_default().

◆ shuffle_sides()

bool prefs::shuffle_sides ( )

Definition at line 2032 of file preferences.cpp.

References preferences_.

Referenced by ng::configure_engine::shuffle_sides_default().

◆ skip_ai_moves()

bool prefs::skip_ai_moves ( )

◆ skip_mp_replay()

bool prefs::skip_mp_replay ( )

Definition at line 2138 of file preferences.cpp.

References preferences_.

◆ sound_buffer_size()

std::size_t prefs::sound_buffer_size ( )

Definition at line 833 of file preferences.cpp.

References preferences_.

Referenced by sound::driver_status::query().

◆ sound_on()

bool prefs::sound_on ( )

◆ sound_volume()

int prefs::sound_volume ( )

◆ stop_music_in_background()

bool prefs::stop_music_in_background ( )

Definition at line 1029 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ sub_achievement()

bool prefs::sub_achievement ( const std::string &  content_for,
const std::string &  id,
const std::string &  sub_id 
)
Parameters
content_forThe achievement group the achievement is part of.
idThe ID of the achievement within the achievement group.
sub_idThe ID of the sub-achievement within the achievement.
Returns
True if the sub-achievement exists and is completed, false otherwise.

Definition at line 1366 of file preferences.cpp.

References achievement(), config::child_range(), preferences_, and utils::split().

◆ theme()

std::string prefs::theme ( )

Definition at line 1736 of file preferences.cpp.

References video::headless(), and preferences_.

Referenced by set_theme(), and show_theme_dialog().

◆ tile_size()

unsigned int prefs::tile_size ( )

Definition at line 917 of file preferences.cpp.

References preferences_, and game_config::tile_size.

Referenced by display::display().

◆ toggle_minimap_draw_terrain()

void prefs::toggle_minimap_draw_terrain ( )

Definition at line 1124 of file preferences.cpp.

References minimap_draw_terrain(), and preferences_.

Referenced by hotkey::command_executor::do_execute_command().

◆ toggle_minimap_draw_units()

void prefs::toggle_minimap_draw_units ( )

Definition at line 1104 of file preferences.cpp.

References minimap_draw_units(), and preferences_.

Referenced by hotkey::command_executor::do_execute_command().

◆ toggle_minimap_draw_villages()

void prefs::toggle_minimap_draw_villages ( )

◆ toggle_minimap_movement_coding()

void prefs::toggle_minimap_movement_coding ( )

◆ toggle_minimap_terrain_coding()

void prefs::toggle_minimap_terrain_coding ( )

◆ turbo()

bool prefs::turbo ( )

◆ turbo_speed()

double prefs::turbo_speed ( )

◆ turn_bell()

bool prefs::turn_bell ( )

◆ turn_changed_lobby()

bool prefs::turn_changed_lobby ( )

Definition at line 2785 of file preferences.cpp.

References preferences_.

◆ turn_changed_notif()

bool prefs::turn_changed_notif ( )

Definition at line 2777 of file preferences.cpp.

References desktop::notifications::available(), and preferences_.

◆ turn_changed_sound()

bool prefs::turn_changed_sound ( )

Definition at line 2769 of file preferences.cpp.

References preferences_.

◆ turn_dialog()

bool prefs::turn_dialog ( )

Definition at line 1987 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ turns()

int prefs::turns ( )

Definition at line 2102 of file preferences.cpp.

References settings::get_turns(), and preferences_.

Referenced by ng::configure_engine::num_turns_default().

◆ ui_sound_on()

bool prefs::ui_sound_on ( )

◆ ui_volume()

int prefs::ui_volume ( )

Definition at line 902 of file preferences.cpp.

References preferences_, and gui2::dialogs::ui_volume().

Referenced by set_ui_volume(), and gui2::dialogs::ui_volume().

◆ unescape()

preferences::secure_buffer prefs::unescape ( const preferences::secure_buffer text)
private

Definition at line 3065 of file preferences.cpp.

References c.

Referenced by load_credentials().

◆ unmoved_color()

std::string prefs::unmoved_color ( )

◆ use_color_cursors()

bool prefs::use_color_cursors ( )

Definition at line 1650 of file preferences.cpp.

References preferences_.

◆ use_map_settings()

bool prefs::use_map_settings ( )

◆ use_twelve_hour_clock_format()

bool prefs::use_twelve_hour_clock_format ( )

◆ user_servers_list()

std::vector< game_config::server_info > prefs::user_servers_list ( )

Definition at line 1934 of file preferences.cpp.

References config::child_range(), and preferences_.

◆ village_gold()

int prefs::village_gold ( )

◆ village_support()

int prefs::village_support ( )

◆ vsync()

bool prefs::vsync ( )

Definition at line 697 of file preferences.cpp.

References preferences_.

Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().

◆ whisper_friends_only()

bool prefs::whisper_friends_only ( )

◆ write_preferences()

void prefs::write_preferences ( )

◆ xp_modifier()

int prefs::xp_modifier ( )

◆ yellow_confirm()

bool prefs::yellow_confirm ( )

Definition at line 2514 of file preferences.cpp.

References preferences_.

Friends And Related Function Documentation

◆ impl_preferences_get

int impl_preferences_get ( lua_State *  L)
friend

The __index metamethod.

Parameter 1: the preference table. Parameter 2: preference name, must be a string. Returns: preference value. If there isn't such a preference, returns nil.

Definition at line 29 of file lua_preferences.cpp.

◆ impl_preferences_set

int impl_preferences_set ( lua_State *  L)
friend

The __newindex metamethod.

Parameter 1: the preference table. Parameter 2: preference name, must be a string. Parameter 3: preference value. Returns nothing.

Definition at line 43 of file lua_preferences.cpp.

◆ preferences_dialog_friend

friend struct preferences_dialog_friend
friend

Definition at line 185 of file preferences.hpp.

Member Data Documentation

◆ acquaintances_

std::map<std::string, preferences::acquaintance> prefs::acquaintances_
private

◆ advanced_prefs_

std::vector<preferences::option> prefs::advanced_prefs_
private

Definition at line 825 of file preferences.hpp.

Referenced by get_advanced_preferences(), and load_advanced_prefs().

◆ completed_campaigns_

std::map<std::string, std::set<std::string> > prefs::completed_campaigns_
private

◆ credentials_

std::vector<preferences::login_info> prefs::credentials_
private

◆ encountered_terrains_set_

std::set<t_translation::terrain_code> prefs::encountered_terrains_set_
private

Definition at line 814 of file preferences.hpp.

Referenced by encountered_terrains(), load_preferences(), and ~prefs().

◆ encountered_units_set_

std::set<std::string> prefs::encountered_units_set_
private

◆ fps_

bool prefs::fps_
private

Definition at line 811 of file preferences.hpp.

Referenced by set_show_fps(), and show_fps().

◆ history_map_

std::map<std::string, std::vector<std::string> > prefs::history_map_
private

Definition at line 815 of file preferences.hpp.

Referenced by get_history(), load_preferences(), and ~prefs().

◆ message_private_on_

bool prefs::message_private_on_
private

Definition at line 823 of file preferences.hpp.

Referenced by message_private(), and set_message_private().

◆ mp_modifications_

std::vector<std::string> prefs::mp_modifications_
private

Definition at line 819 of file preferences.hpp.

Referenced by modifications().

◆ mp_modifications_initialized_

bool prefs::mp_modifications_initialized_
private

Definition at line 820 of file preferences.hpp.

Referenced by modifications(), and set_modifications().

◆ no_preferences_save

bool prefs::no_preferences_save = false
inlinestaticprivate

Definition at line 808 of file preferences.hpp.

Referenced by disable_preferences_save(), preferences_save(), and ~prefs().

◆ option_values_

config prefs::option_values_
private

Definition at line 817 of file preferences.hpp.

Referenced by options().

◆ options_initialized_

bool prefs::options_initialized_
private

Definition at line 818 of file preferences.hpp.

Referenced by options(), and set_options().

◆ preferences_

config prefs::preferences_
private

Definition at line 810 of file preferences.hpp.

Referenced by achievement(), add_alias(), addon_manager_saved_order_direction(), addon_manager_saved_order_name(), all_attributes(), allied_color(), allow_observers(), animate_map(), animate_water(), ask_delete_saves(), auto_open_whisper_windows(), auto_pixel_scale(), autosavemax(), bell_volume(), blindfold_replay(), campaign_server(), chat_lines(), chat_message_aging(), chat_timestamping(), clear_countdown_action_bonus(), clear_countdown_init_time(), clear_countdown_reservoir_time(), clear_countdown_turn_bonus(), clear_hotkeys(), clear_mp_alert_prefs(), clear_preferences(), confirm_load_save_from_different_version(), confirm_no_moves(), core_id(), countdown(), countdown_action_bonus(), countdown_init_time(), countdown_reservoir_time(), countdown_turn_bonus(), custom_command(), damage_prediction_allow_monte_carlo_simulation(), delete_saves(), disable_auto_moves(), draw_delay(), editor_auto_update_transitions(), editor_chosen_addon(), editor_draw_hex_coordinates(), editor_draw_num_of_bitmaps(), editor_draw_terrain_codes(), editor_mru_limit(), ellipses(), enable_mouse_scroll(), enable_whiteboard_mode_on_start(), enemy_color(), era(), fi_blocked_in_game(), fi_friends_in_game(), fi_invert(), fi_vacant_slots(), fog(), font_scaling(), friend_message_lobby(), friend_message_notif(), friend_message_sound(), fullscreen(), game_created_lobby(), game_created_notif(), game_created_sound(), game_has_begun_lobby(), game_has_begun_notif(), game_has_begun_sound(), get(), preferences_dialog_friend::get(), get_as_attribute(), get_child(), get_lobby_joins(), get_mp_server_program_name(), get_scroll_when_mouse_outside(), get_show_deprecation(), green_confirm(), grid(), gui_theme(), hide_whiteboard(), idle_anim(), idle_anim_rate(), interrupt_when_ally_sighted(), keepalive_timeout(), language(), last_cache_cleared_version(), level(), level_type(), load_hotkeys(), load_preferences(), maximized(), message_bell(), middle_click_scrolls(), migrate_preferences(), minimap_draw_terrain(), minimap_draw_units(), minimap_draw_villages(), minimap_movement_coding(), minimap_terrain_coding(), modifications(), mouse_scroll_enabled(), mouse_scroll_threshold(), moved_color(), mp_server_warning_disabled(), music_on(), music_volume(), network_host(), partial_color(), pixel_scale(), player_joins_lobby(), player_joins_notif(), player_joins_sound(), player_leaves_lobby(), player_leaves_notif(), player_leaves_sound(), prefs(), private_message_lobby(), private_message_notif(), private_message_sound(), progress_achievement(), public_message_lobby(), public_message_notif(), public_message_sound(), random_faction_mode(), random_start_time(), ready_for_start_lobby(), ready_for_start_notif(), ready_for_start_sound(), remember_password(), resolution(), sample_rate(), save_compression_format(), save_hotkeys(), save_replays(), save_sample_rate(), save_sound_buffer_size(), scroll_speed(), scroll_to_action(), selected_achievement_group(), server_message_lobby(), server_message_notif(), server_message_sound(), preferences_dialog_friend::set(), set_achievement(), set_addon_manager_saved_order_direction(), set_addon_manager_saved_order_name(), set_allied_color(), set_allow_observers(), set_animate_map(), set_animate_water(), set_ask_delete_saves(), set_auto_pixel_scale(), set_autosavemax(), set_bell_volume(), set_blindfold_replay(), set_campaign_server(), set_chat_lines(), set_chat_message_aging(), set_chat_timestamping(), set_child(), set_color_cursors(), set_core_id(), set_countdown(), set_countdown_action_bonus(), set_countdown_init_time(), set_countdown_reservoir_time(), set_countdown_turn_bonus(), set_custom_command(), set_damage_prediction_allow_monte_carlo_simulation(), set_delete_saves(), set_disable_auto_moves(), set_draw_delay(), set_editor_auto_update_transitions(), set_editor_chosen_addon(), set_editor_draw_hex_coordinates(), set_editor_draw_num_of_bitmaps(), set_editor_draw_terrain_codes(), set_ellipses(), set_enable_whiteboard_mode_on_start(), set_enemy_color(), set_era(), set_fi_blocked_in_game(), set_fi_friends_in_game(), set_fi_invert(), set_fi_vacant_slots(), set_fog(), set_font_scaling(), set_friend_message_lobby(), set_friend_message_notif(), set_friend_message_sound(), set_fullscreen(), set_game_created_lobby(), set_game_created_notif(), set_game_created_sound(), set_game_has_begun_lobby(), set_game_has_begun_notif(), set_game_has_begun_sound(), set_grid(), set_gui_theme(), set_hide_whiteboard(), set_idle_anim(), set_idle_anim_rate(), set_interrupt_when_ally_sighted(), set_language(), set_last_cache_cleared_version(), set_level(), set_level_type(), set_lobby_joins(), set_login(), set_maximized(), set_modifications(), set_moved_color(), set_mp_server_program_name(), set_mp_server_warning_disabled(), set_music(), set_music_volume(), set_network_host(), set_partial_color(), set_pixel_scale(), set_player_joins_lobby(), set_player_joins_notif(), set_player_joins_sound(), set_player_leaves_lobby(), set_player_leaves_notif(), set_player_leaves_sound(), set_private_message_lobby(), set_private_message_notif(), set_private_message_sound(), set_public_message_lobby(), set_public_message_notif(), set_public_message_sound(), set_random_faction_mode(), set_random_start_time(), set_ready_for_start_lobby(), set_ready_for_start_notif(), set_ready_for_start_sound(), set_remember_password(), set_resolution(), set_save_replays(), set_scroll_speed(), set_scroll_to_action(), set_selected_achievement_group(), set_server_message_lobby(), set_server_message_notif(), set_server_message_sound(), set_show_all_units_in_help(), set_show_ally_orb(), set_show_disengaged_orb(), set_show_enemy_orb(), set_show_floating_labels(), set_show_moved_orb(), set_show_partial_orb(), set_show_side_colors(), set_show_standing_animations(), set_show_status_on_ally_orb(), set_show_unmoved_orb(), set_shroud(), set_shuffle_sides(), set_skip_ai_moves(), set_skip_mp_replay(), set_sound(), set_sound_volume(), set_stop_music_in_background(), set_sub_achievement(), set_theme(), set_tile_size(), set_turbo(), set_turbo_speed(), set_turn_bell(), set_turn_changed_lobby(), set_turn_changed_notif(), set_turn_changed_sound(), set_turn_dialog(), set_turns(), set_ui_sound(), set_ui_volume(), set_unmoved_color(), set_use_map_settings(), set_user_servers_list(), set_village_gold(), set_village_support(), set_vsync(), set_whisper_friends_only(), set_xp_modifier(), show_all_units_in_help(), show_ally_orb(), show_combat(), show_disengaged_orb(), show_enemy_orb(), show_floating_labels(), show_moved_orb(), show_partial_orb(), show_side_colors(), show_standing_animations(), show_status_on_ally_orb(), show_unmoved_orb(), shroud(), shuffle_sides(), skip_ai_moves(), skip_mp_replay(), sound_buffer_size(), sound_on(), sound_volume(), stop_music_in_background(), sub_achievement(), theme(), tile_size(), toggle_minimap_draw_terrain(), toggle_minimap_draw_units(), toggle_minimap_draw_villages(), toggle_minimap_movement_coding(), toggle_minimap_terrain_coding(), turbo(), turbo_speed(), turn_bell(), turn_changed_lobby(), turn_changed_notif(), turn_changed_sound(), turn_dialog(), turns(), ui_sound_on(), ui_volume(), unmoved_color(), use_color_cursors(), use_map_settings(), use_twelve_hour_clock_format(), user_servers_list(), village_gold(), village_support(), vsync(), whisper_friends_only(), write_preferences(), xp_modifier(), yellow_confirm(), and ~prefs().

◆ sp_modifications_

std::vector<std::string> prefs::sp_modifications_
private

Definition at line 821 of file preferences.hpp.

Referenced by modifications().

◆ sp_modifications_initialized_

bool prefs::sp_modifications_initialized_
private

Definition at line 822 of file preferences.hpp.

Referenced by modifications(), and set_modifications().

◆ synced_attributes_

constexpr std::array prefs::synced_attributes_
staticconstexprprivate

Definition at line 873 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ synced_children_

constexpr std::array prefs::synced_children_
staticconstexprprivate
Initial value:
{
prefs_list::achievements,
prefs_list::completed_campaigns,
prefs_list::history,
prefs_list::options,
}

Definition at line 1017 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unknown_synced_attributes_

std::set<std::string> prefs::unknown_synced_attributes_
private

Definition at line 867 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unknown_synced_children_

std::set<std::string> prefs::unknown_synced_children_
private

Definition at line 869 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unknown_unsynced_attributes_

std::set<std::string> prefs::unknown_unsynced_attributes_
private

Definition at line 868 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unknown_unsynced_children_

std::set<std::string> prefs::unknown_unsynced_children_
private

Definition at line 870 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unsynced_attributes_

constexpr std::array prefs::unsynced_attributes_
staticconstexprprivate
Initial value:
{
prefs_list::auto_pixel_scale,
prefs_list::core,
prefs_list::dir_bookmarks,
prefs_list::draw_delay,
prefs_list::editor_chosen_addon,
prefs_list::gui2_theme,
prefs_list::mp_server_program_name,
prefs_list::pixel_scale,
prefs_list::sound_buffer_size,
prefs_list::theme,
prefs_list::vsync,
prefs_list::xresolution,
prefs_list::yresolution,
prefs_list::font_scale,
prefs_list::fullscreen,
prefs_list::maximized,
}
unsigned int tile_size
Definition: game_config.cpp:52
static int bell_volume()
static int music_volume()
static int ui_volume()
static int sound_volume()

Definition at line 1023 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().

◆ unsynced_children_

constexpr std::array prefs::unsynced_children_
staticconstexprprivate
Initial value:
{
prefs_list::editor_recent_files,
}

Definition at line 1046 of file preferences.hpp.

Referenced by load_preferences(), and write_preferences().


The documentation for this class was generated from the following files: