The Battle for Wesnoth  1.15.0-dev
Namespaces | Classes | Enumerations | Functions | Variables
preferences Namespace Reference

Modify, read and display user preferences. More...

Namespaces

 editor
 

Classes

class  acquaintance
 
struct  admin_authentication_reset
 Used to reset is_authenticated flag after disconnecting. More...
 
struct  base_manager
 
struct  manager
 
class  prefs_event_handler
 

Enumerations

enum  PREFERENCE_VIEW { VIEW_DEFAULT, VIEW_FRIENDS }
 
enum  LOBBY_JOINS { SHOW_NONE, SHOW_FRIENDS, SHOW_ALL }
 

Functions

std::string login ()
 
void set_login (const std::string &login)
 
bool remember_password ()
 
void set_remember_password (bool remember)
 
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)
 
void load_credentials ()
 
void save_credentials ()
 
void set_preference_display_settings ()
 
void set_turbo (bool ison)
 
void set_turbo_speed (double speed)
 
void set_grid (bool ison)
 
void set_color_cursors (bool value)
 
void set_idle_anim (bool ison)
 
void set_idle_anim_rate (int rate)
 
bool show_standing_animations ()
 
void set_show_standing_animations (bool value)
 
bool show_theme_dialog ()
 
void show_wesnothd_server_search ()
 
bool is_authenticated ()
 
void parse_admin_authentication (const std::string &sender, const std::string &message)
 
static void load_acquaintances ()
 
static void save_acquaintances ()
 
const std::map< std::string, acquaintance > & get_acquaintances ()
 
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)
 
bool remove_acquaintance (const std::string &nick)
 
bool is_friend (const std::string &nick)
 
bool is_ignored (const std::string &nick)
 
void add_completed_campaign (const std::string &campaign_id, const std::string &difficulty_level)
 
bool is_campaign_completed (const std::string &campaign_id)
 
bool is_campaign_completed (const std::string &campaign_id, const std::string &difficulty_level)
 
bool parse_should_show_lobby_join (const std::string &sender, const std::string &message)
 
int lobby_joins ()
 
void _set_lobby_joins (int show)
 
const std::vector< game_config::server_info > & server_list ()
 
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 registered_users_only ()
 
void set_registered_users_only (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)
 
void set_mp_server_program_name (const std::string &path)
 
std::string get_mp_server_program_name ()
 
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)
 
int countdown_reservoir_time ()
 
void set_countdown_reservoir_time (int value)
 
int countdown_turn_bonus ()
 
void set_countdown_turn_bonus (int value)
 
int countdown_action_bonus ()
 
void set_countdown_action_bonus (int value)
 
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)
 
void set_modifications (const std::vector< std::string > &value, bool mp)
 
bool skip_ai_moves ()
 
void set_skip_ai_moves (bool value)
 
void set_show_side_colors (bool value)
 
bool show_side_colors ()
 
void set_save_replays (bool value)
 
bool save_replays ()
 
void set_delete_saves (bool value)
 
bool delete_saves ()
 
void set_ask_delete_saves (bool value)
 
bool ask_delete_saves ()
 
void set_interrupt_when_ally_sighted (bool value)
 
bool interrupt_when_ally_sighted ()
 
int autosavemax ()
 
void set_autosavemax (int value)
 
std::string theme ()
 
void set_theme (const std::string &theme)
 
bool show_floating_labels ()
 
void set_show_floating_labels (bool value)
 
bool message_private ()
 
void set_message_private (bool value)
 
bool show_haloes ()
 
void set_show_haloes (bool value)
 
compression::format save_compression_format ()
 
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)
 
void set_chat_message_aging (const int aging)
 
int chat_message_aging ()
 
bool show_all_units_in_help ()
 
void set_show_all_units_in_help (bool value)
 
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 green_confirm ()
 
bool yellow_confirm ()
 
bool confirm_no_moves ()
 
void encounter_recruitable_units (const std::vector< team > &teams)
 
void encounter_start_units (const unit_map &units)
 
static void encounter_recallable_units (const std::vector< team > &teams)
 
void encounter_map_terrain (const gamemap &map)
 
void encounter_all_content (const game_board &gameboard_)
 
void encounter_recallable_units (std::vector< team > &teams)
 
void write_preferences ()
 
void set (const std::string &key, bool value)
 
void set (const std::string &key, int value)
 
void set (const std::string &key, char const *value)
 
void set (const std::string &key, const std::string &value)
 
void set (const std::string &key, const config::attribute_value &value)
 
void clear (const std::string &key)
 
void set_child (const std::string &key, const config &val)
 
const configget_child (const std::string &key)
 
void erase (const std::string &key)
 
bool have_setting (const std::string &key)
 
std::string get (const std::string &key)
 
std::string get (const std::string &key, const std::string &def)
 
bool get (const std::string &key, bool def)
 
config::attribute_value get_as_attribute (const std::string &key)
 
void disable_preferences_save ()
 
configget_prefs ()
 
bool show_allied_orb ()
 
void set_show_allied_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)
 
static std::string fix_orb_color_name (const std::string &color)
 
std::string allied_color ()
 
void set_allied_color (const std::string &color_id)
 
std::string core_id ()
 
void set_core_id (const std::string &core_id)
 
std::string enemy_color ()
 
void set_enemy_color (const std::string &color_id)
 
std::string moved_color ()
 
void set_moved_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)
 
bool scroll_to_action ()
 
void set_scroll_to_action (bool ison)
 
point resolution ()
 
bool maximized ()
 
bool fullscreen ()
 
void _set_resolution (const point &res)
 
void _set_maximized (bool ison)
 
void _set_fullscreen (bool ison)
 
bool turbo ()
 
void _set_turbo (bool ison)
 
double turbo_speed ()
 
void save_turbo_speed (const double speed)
 
int font_scaling ()
 
void set_font_scaling (int scale)
 
int font_scaled (int size)
 
bool idle_anim ()
 
void _set_idle_anim (const bool ison)
 
int idle_anim_rate ()
 
void _set_idle_anim_rate (const 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 ellipses ()
 
void set_ellipses (bool ison)
 
bool grid ()
 
void _set_grid (bool ison)
 
std::size_t sound_buffer_size ()
 
void save_sound_buffer_size (const std::size_t size)
 
int music_volume ()
 
void set_music_volume (int vol)
 
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 turn_bell ()
 
bool set_turn_bell (bool ison)
 
bool UI_sound_on ()
 
bool set_UI_sound (bool ison)
 
bool message_bell ()
 
bool sound_on ()
 
bool set_sound (bool ison)
 
bool music_on ()
 
bool set_music (bool ison)
 
bool stop_music_in_background ()
 
void set_stop_music_in_background (bool ison)
 
bool joystick_support_enabled ()
 
int joystick_mouse_deadzone ()
 
int joystick_num_mouse_xaxis ()
 
int joystick_mouse_xaxis_num ()
 
int joystick_num_mouse_yaxis ()
 
int joystick_mouse_yaxis_num ()
 
int joystick_scroll_deadzone ()
 
int joystick_cursor_deadzone ()
 
int joystick_thrusta_deadzone ()
 
int joystick_thrustb_deadzone ()
 
int joystick_cursor_threshold ()
 
int joystick_num_scroll_xaxis ()
 
int joystick_scroll_xaxis_num ()
 
int joystick_num_scroll_yaxis ()
 
int joystick_scroll_yaxis_num ()
 
int joystick_num_cursor_xaxis ()
 
int joystick_cursor_xaxis_num ()
 
int joystick_num_cursor_yaxis ()
 
int joystick_cursor_yaxis_num ()
 
int joystick_num_thrusta_axis ()
 
int joystick_thrusta_axis_num ()
 
int joystick_num_thrustb_axis ()
 
int joystick_thrustb_axis_num ()
 
int scroll_speed ()
 
void set_scroll_speed (const int new_speed)
 
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...
 
bool animate_map ()
 
bool animate_water ()
 
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 ()
 
void set_animate_map (bool value)
 
void set_animate_water (bool value)
 
bool show_fps ()
 
void set_show_fps (bool value)
 
int draw_delay ()
 
void set_draw_delay (int value)
 
bool use_color_cursors ()
 
void _set_color_cursors (bool value)
 
void load_hotkeys ()
 
void save_hotkeys ()
 
void clear_hotkeys ()
 
void add_alias (const std::string &alias, const std::string &command)
 
const configget_alias ()
 
unsigned int sample_rate ()
 
void save_sample_rate (const unsigned int rate)
 
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 disable_loadingscreen_animation ()
 
void set_disable_loadingscreen_animation (bool value)
 
bool damage_prediction_allow_monte_carlo_simulation ()
 
void set_damage_prediction_allow_monte_carlo_simulation (bool value)
 
 MAKE_ENUM (SCALING_ALGORITHM,(LINEAR, "linear")(NEAREST_NEIGHBOR, "nn")(XBRZ_LIN, "xbrzlin")(XBRZ_NN, "xbrznn")) extern const SCALING_ALGORITHM default_scaling_algorithm
 
void set_use_twelve_hour_clock_format (bool value)
 
bool whisper_friends_only ()
 
void set_whisper_friends_only (bool v)
 
bool auto_open_whisper_windows ()
 
bool playerlist_group_players ()
 
bool filter_lobby ()
 
void set_filter_lobby (bool value)
 
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)
 
std::string fi_text ()
 
void set_fi_text (const std::string &search_string)
 
void set_auto_open_whisper_windows (bool v)
 

Variables

static std::map< PREFERENCE_VIEW, std::pair< int, int > > pef_view_map
 Map containing page mappings that can be used to set the initially displayed page of the dialog. More...
 
const int INFINITE_AUTO_SAVES = 61
 
const int min_window_width = 800
 
const int min_window_height = 600
 
const int def_window_width = 1280
 
const int def_window_height = 720
 
const int min_font_scaling = 80
 
const int max_font_scaling = 150
 
const SCALING_ALGORITHM default_scaling_algorithm = SCALING_ALGORITHM::XBRZ_NN
 
prefs_event_handler event_handler_
 

Detailed Description

Modify, read and display user preferences.

This module contain GUI code to display dialogs regarding user preferences, and functions which read and modify the preferences.

Enumeration Type Documentation

◆ LOBBY_JOINS

Enumerator
SHOW_NONE 
SHOW_FRIENDS 
SHOW_ALL 

Definition at line 64 of file game.hpp.

◆ PREFERENCE_VIEW

Enumerator
VIEW_DEFAULT 
VIEW_FRIENDS 

Definition at line 37 of file preferences_dialog.hpp.

Function Documentation

◆ _set_color_cursors()

void preferences::_set_color_cursors ( bool  value)

Definition at line 990 of file general.cpp.

References set().

Referenced by set_color_cursors().

◆ _set_fullscreen()

void preferences::_set_fullscreen ( bool  ison)

Definition at line 412 of file general.cpp.

Referenced by CVideo::set_fullscreen().

◆ _set_grid()

void preferences::_set_grid ( bool  ison)

Definition at line 512 of file general.cpp.

References set().

Referenced by set_grid().

◆ _set_idle_anim()

void preferences::_set_idle_anim ( const bool  ison)

Definition at line 462 of file general.cpp.

Referenced by set_idle_anim().

◆ _set_idle_anim_rate()

void preferences::_set_idle_anim_rate ( const int  rate)

Definition at line 472 of file general.cpp.

Referenced by set_idle_anim_rate().

◆ _set_lobby_joins()

void preferences::_set_lobby_joins ( int  show)

Definition at line 361 of file game.cpp.

References set(), SHOW_ALL, SHOW_FRIENDS, and SHOW_NONE.

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

◆ _set_maximized()

void preferences::_set_maximized ( bool  ison)

◆ _set_resolution()

void preferences::_set_resolution ( const point res)

◆ _set_turbo()

void preferences::_set_turbo ( bool  ison)

Definition at line 426 of file general.cpp.

Referenced by set_turbo().

◆ add_acquaintance()

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

◆ add_alias()

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

Definition at line 1011 of file general.cpp.

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

◆ add_completed_campaign()

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

Definition at line 318 of file game.cpp.

Referenced by game_launcher::launch_game().

◆ allied_color()

std::string preferences::allied_color ( )

◆ allow_observers()

bool preferences::allow_observers ( )

Definition at line 453 of file game.cpp.

References get().

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

◆ animate_map()

bool preferences::animate_map ( )

◆ animate_water()

bool preferences::animate_water ( )

◆ ask_delete_saves()

bool preferences::ask_delete_saves ( )

◆ auto_open_whisper_windows()

bool preferences::auto_open_whisper_windows ( )

Definition at line 30 of file lobby.cpp.

References get().

Referenced by gui2::chatbox::add_whisper_received(), and gui2::chatbox::add_whisper_sent().

◆ autosavemax()

int preferences::autosavemax ( )

◆ bell_volume()

int preferences::bell_volume ( )

Definition at line 577 of file general.cpp.

Referenced by sound::init_sound(), and set_bell_volume().

◆ blindfold_replay()

bool preferences::blindfold_replay ( )

Definition at line 604 of file game.cpp.

References get().

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

◆ campaign_server()

std::string preferences::campaign_server ( )

Definition at line 404 of file game.cpp.

References get().

Referenced by ad_hoc_addon_fetch_session(), and manage_addons().

◆ chat_lines()

int preferences::chat_lines ( )

◆ chat_message_aging()

int preferences::chat_message_aging ( )

Definition at line 927 of file game.cpp.

References get().

Referenced by display_chat_manager::prune_chat_messages().

◆ chat_timestamping()

bool preferences::chat_timestamping ( )

Definition at line 904 of file game.cpp.

References get().

Referenced by get_chat_timestamp(), and gui2::dialogs::preferences_dialog::post_build().

◆ clear()

void preferences::clear ( const std::string &  key)

◆ clear_hotkeys()

void preferences::clear_hotkeys ( )

Definition at line 1005 of file general.cpp.

References hotkey::reset_default_hotkeys().

◆ confirm_load_save_from_different_version()

bool preferences::confirm_load_save_from_different_version ( )

Definition at line 1039 of file general.cpp.

Referenced by savegame::loadgame::check_version_compatibility().

◆ confirm_no_moves()

bool preferences::confirm_no_moves ( )

Definition at line 980 of file game.cpp.

References get().

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

◆ core_id()

std::string preferences::core_id ( )

◆ countdown()

bool preferences::countdown ( )

Definition at line 614 of file game.cpp.

References get().

Referenced by ng::configure_engine::mp_countdown_default(), and savegame::remove_old_auto_saves().

◆ countdown_action_bonus()

int preferences::countdown_action_bonus ( )

Definition at line 657 of file game.cpp.

References get().

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

◆ countdown_init_time()

int preferences::countdown_init_time ( )

Definition at line 624 of file game.cpp.

References get().

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

◆ countdown_reservoir_time()

int preferences::countdown_reservoir_time ( )

Definition at line 635 of file game.cpp.

References get().

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

◆ countdown_turn_bonus()

int preferences::countdown_turn_bonus ( )

Definition at line 646 of file game.cpp.

References get().

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

◆ custom_command()

std::string preferences::custom_command ( )

◆ damage_prediction_allow_monte_carlo_simulation()

bool preferences::damage_prediction_allow_monte_carlo_simulation ( )

Definition at line 1069 of file general.cpp.

Referenced by combatant::fight().

◆ delete_saves()

bool preferences::delete_saves ( )

Definition at line 783 of file game.cpp.

References get().

Referenced by campaign_controller::play_game(), and gui2::dialogs::preferences_dialog::post_build().

◆ disable_auto_moves()

bool preferences::disable_auto_moves ( )

◆ disable_loadingscreen_animation()

bool preferences::disable_loadingscreen_animation ( )

Definition at line 1059 of file general.cpp.

Referenced by gui2::dialogs::loading_screen::display().

◆ disable_preferences_save()

void preferences::disable_preferences_save ( )

Definition at line 248 of file general.cpp.

Referenced by game_launcher::game_launcher().

◆ draw_delay()

int preferences::draw_delay ( )

◆ ellipses()

bool preferences::ellipses ( )

Definition at line 497 of file general.cpp.

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

◆ enable_mouse_scroll()

void preferences::enable_mouse_scroll ( bool  value)

Definition at line 885 of file general.cpp.

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

◆ enable_whiteboard_mode_on_start()

bool preferences::enable_whiteboard_mode_on_start ( )

Definition at line 428 of file game.cpp.

References get().

Referenced by wb::manager::on_init_side(), and gui2::dialogs::preferences_dialog::post_build().

◆ encounter_all_content()

void preferences::encounter_all_content ( const game_board gameboard_)

◆ encounter_map_terrain()

void preferences::encounter_map_terrain ( const gamemap map)

◆ encounter_recallable_units() [1/2]

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

◆ encounter_recallable_units() [2/2]

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

Definition at line 1003 of file game.cpp.

References t.

Referenced by encounter_all_content().

◆ encounter_recruitable_units()

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

Definition at line 988 of file game.cpp.

Referenced by encounter_all_content().

◆ encounter_start_units()

void preferences::encounter_start_units ( const unit_map units)

Definition at line 996 of file game.cpp.

References unit_map::begin(), and unit_map::end().

Referenced by encounter_all_content().

◆ encountered_terrains()

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

◆ encountered_units()

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

◆ enemy_color()

std::string preferences::enemy_color ( )

◆ era()

std::string preferences::era ( )

◆ erase()

void preferences::erase ( const std::string &  key)

◆ fi_friends_in_game()

bool preferences::fi_friends_in_game ( )

Definition at line 70 of file lobby.cpp.

References get().

◆ fi_invert()

bool preferences::fi_invert ( )

Definition at line 50 of file lobby.cpp.

References get().

◆ fi_text()

std::string preferences::fi_text ( )

Definition at line 80 of file lobby.cpp.

References get().

◆ fi_vacant_slots()

bool preferences::fi_vacant_slots ( )

Definition at line 60 of file lobby.cpp.

References get().

◆ filter_lobby()

bool preferences::filter_lobby ( )

Definition at line 40 of file lobby.cpp.

References get().

◆ fix_orb_color_name()

static std::string preferences::fix_orb_color_name ( const std::string &  color)
static

Definition at line 294 of file general.cpp.

Referenced by allied_color(), enemy_color(), moved_color(), partial_color(), and unmoved_color().

◆ fog()

bool preferences::fog ( )

◆ font_scaled()

int preferences::font_scaled ( int  size)

◆ font_scaling()

int preferences::font_scaling ( )

Definition at line 441 of file general.cpp.

References max_font_scaling.

Referenced by font_scaled(), and gui2::dialogs::preferences_dialog::post_build().

◆ fullscreen()

bool preferences::fullscreen ( )

◆ get() [1/3]

std::string preferences::get ( const std::string &  key)

Definition at line 230 of file general.cpp.

Referenced by allow_observers(), animate_map(), animate_water(), ask_delete_saves(), auto_open_whisper_windows(), preferences::editor::auto_update_transitions(), autosavemax(), blindfold_replay(), campaign_server(), chat_lines(), chat_message_aging(), chat_timestamping(), battle_context::choose_defender_weapon(), confirm_no_moves(), countdown(), countdown_action_bonus(), countdown_init_time(), countdown_reservoir_time(), countdown_turn_bonus(), custom_command(), preferences::editor::default_dir(), delete_saves(), deprecated_message(), preferences::editor::draw_hex_coordinates(), preferences::editor::draw_num_of_bitmaps(), preferences::editor::draw_terrain_codes(), enable_whiteboard_mode_on_start(), era(), fi_friends_in_game(), fi_invert(), fi_text(), fi_vacant_slots(), filter_lobby(), fog(), get_mp_server_program_name(), gui2::dialogs::advanced_graphics_options::get_scale_pref(), green_confirm(), controller_base::handle_scroll(), hide_whiteboard(), interrupt_when_ally_sighted(), level(), level_type(), lobby_joins(), login(), preferences::manager::manager(), minimap_draw_terrain(), minimap_draw_units(), minimap_draw_villages(), minimap_movement_coding(), minimap_terrain_coding(), mp_server_warning_disabled(), network_host(), playerlist_group_players(), random_faction_mode(), random_start_time(), registered_users_only(), remember_password(), save_compression_format(), save_replays(), preferences::editor::set_draw_num_of_bitmaps(), set_preference_display_settings(), gui2::dialogs::setup_pref_toggle_button(), show_all_units_in_help(), show_combat(), show_floating_labels(), show_side_colors(), show_standing_animations(), shroud(), shuffle_sides(), skip_ai_moves(), skip_mp_replay(), theme(), turn_dialog(), turns(), image::update_from_preferences(), use_map_settings(), village_gold(), village_support(), whisper_friends_only(), xp_modifier(), and yellow_confirm().

◆ get() [2/3]

std::string preferences::get ( const std::string &  key,
const std::string &  def 
)

Definition at line 234 of file general.cpp.

◆ get() [3/3]

bool preferences::get ( const std::string &  key,
bool  def 
)

Definition at line 238 of file general.cpp.

◆ get_acquaintances()

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

◆ get_acquaintances_nice()

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

Definition at line 234 of file game.cpp.

References i, and load_acquaintances().

Referenced by play_controller::tab().

◆ get_alias()

const config & preferences::get_alias ( )

Definition at line 1018 of file general.cpp.

References get_child().

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

◆ get_as_attribute()

config::attribute_value preferences::get_as_attribute ( const std::string &  key)

Definition at line 243 of file general.cpp.

Referenced by impl_preferences_get().

◆ get_chat_timestamp()

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

◆ get_child()

const config & preferences::get_child ( const std::string &  key)

◆ get_history()

std::vector< std::string > * preferences::get_history ( const std::string &  id)

Returns a pointer to the history vector associated with given id making a new one if it doesn't exist.

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

Definition at line 962 of file game.cpp.

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

◆ get_mp_server_program_name()

std::string preferences::get_mp_server_program_name ( )

Definition at line 523 of file game.cpp.

References get().

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

◆ get_prefs()

config * preferences::get_prefs ( )

Definition at line 252 of file general.cpp.

Referenced by load_acquaintances(), save_acquaintances(), and server_list().

◆ green_confirm()

bool preferences::green_confirm ( )

Definition at line 966 of file game.cpp.

References get().

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

◆ grid()

bool preferences::grid ( )

◆ gui_theme()

std::string preferences::gui_theme ( )

Definition at line 487 of file general.cpp.

Referenced by gui2::init().

◆ have_setting()

bool preferences::have_setting ( const std::string &  key)

Definition at line 226 of file general.cpp.

◆ hide_whiteboard()

bool preferences::hide_whiteboard ( )

Definition at line 438 of file game.cpp.

References get().

Referenced by wb::manager::manager(), and gui2::dialogs::preferences_dialog::post_build().

◆ idle_anim()

bool preferences::idle_anim ( )

Definition at line 457 of file general.cpp.

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

◆ idle_anim_rate()

int preferences::idle_anim_rate ( )

Definition at line 467 of file general.cpp.

Referenced by display::display(), and gui2::dialogs::preferences_dialog::post_build().

◆ interrupt_when_ally_sighted()

bool preferences::interrupt_when_ally_sighted ( )

Definition at line 803 of file game.cpp.

References get().

Referenced by actions::move_unit_and_record(), and gui2::dialogs::preferences_dialog::post_build().

◆ is_authenticated()

bool preferences::is_authenticated ( )

◆ is_campaign_completed() [1/2]

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

◆ is_campaign_completed() [2/2]

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

Definition at line 326 of file game.cpp.

◆ is_friend()

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

◆ is_ignored()

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

◆ joystick_cursor_deadzone()

int preferences::joystick_cursor_deadzone ( )

Definition at line 764 of file general.cpp.

Referenced by joystick_manager::update_highlighted_hex().

◆ joystick_cursor_threshold()

int preferences::joystick_cursor_threshold ( )

Definition at line 782 of file general.cpp.

Referenced by joystick_manager::update_highlighted_hex().

◆ joystick_cursor_xaxis_num()

int preferences::joystick_cursor_xaxis_num ( )

◆ joystick_cursor_yaxis_num()

int preferences::joystick_cursor_yaxis_num ( )

◆ joystick_mouse_deadzone()

int preferences::joystick_mouse_deadzone ( )

Definition at line 728 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

◆ joystick_mouse_xaxis_num()

int preferences::joystick_mouse_xaxis_num ( )

Definition at line 740 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

◆ joystick_mouse_yaxis_num()

int preferences::joystick_mouse_yaxis_num ( )

Definition at line 752 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

◆ joystick_num_cursor_xaxis()

int preferences::joystick_num_cursor_xaxis ( )

◆ joystick_num_cursor_yaxis()

int preferences::joystick_num_cursor_yaxis ( )

◆ joystick_num_mouse_xaxis()

int preferences::joystick_num_mouse_xaxis ( )

Definition at line 734 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

◆ joystick_num_mouse_yaxis()

int preferences::joystick_num_mouse_yaxis ( )

Definition at line 746 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

◆ joystick_num_scroll_xaxis()

int preferences::joystick_num_scroll_xaxis ( )

Definition at line 788 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

◆ joystick_num_scroll_yaxis()

int preferences::joystick_num_scroll_yaxis ( )

Definition at line 800 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

◆ joystick_num_thrusta_axis()

int preferences::joystick_num_thrusta_axis ( )

Definition at line 836 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

◆ joystick_num_thrustb_axis()

int preferences::joystick_num_thrustb_axis ( )

Definition at line 848 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

◆ joystick_scroll_deadzone()

int preferences::joystick_scroll_deadzone ( )

Definition at line 758 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

◆ joystick_scroll_xaxis_num()

int preferences::joystick_scroll_xaxis_num ( )

Definition at line 794 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

◆ joystick_scroll_yaxis_num()

int preferences::joystick_scroll_yaxis_num ( )

Definition at line 806 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

◆ joystick_support_enabled()

bool preferences::joystick_support_enabled ( )

◆ joystick_thrusta_axis_num()

int preferences::joystick_thrusta_axis_num ( )

Definition at line 842 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

◆ joystick_thrusta_deadzone()

int preferences::joystick_thrusta_deadzone ( )

Definition at line 770 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

◆ joystick_thrustb_axis_num()

int preferences::joystick_thrustb_axis_num ( )

Definition at line 854 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

◆ joystick_thrustb_deadzone()

int preferences::joystick_thrustb_deadzone ( )

Definition at line 776 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

◆ language()

std::string preferences::language ( )

Definition at line 477 of file general.cpp.

Referenced by get_locale(), and translation::sngettext().

◆ level()

std::string preferences::level ( )

Definition at line 708 of file game.cpp.

References get().

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

◆ level_type()

int preferences::level_type ( )

Definition at line 718 of file game.cpp.

References get().

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

◆ load_acquaintances()

static void preferences::load_acquaintances ( )
static

◆ load_credentials()

void preferences::load_credentials ( )

◆ load_hotkeys()

void preferences::load_hotkeys ( )

Definition at line 995 of file general.cpp.

References hotkey::load_hotkeys().

Referenced by game_config_manager::init_game_config().

◆ lobby_joins()

int preferences::lobby_joins ( )

◆ login()

std::string preferences::login ( )

◆ MAKE_ENUM()

preferences::MAKE_ENUM ( SCALING_ALGORITHM  ,
(LINEAR, "linear")(NEAREST_NEIGHBOR, "nn")(XBRZ_LIN, "xbrzlin")(XBRZ_NN, "xbrznn")   
) const

◆ maximized()

bool preferences::maximized ( )

Definition at line 391 of file general.cpp.

References fullscreen().

Referenced by CVideo::init_window(), and CVideo::set_fullscreen().

◆ message_bell()

bool preferences::message_bell ( )

Definition at line 655 of file general.cpp.

Referenced by do_replay_handle(), and turn_info::process_network_data().

◆ message_private()

bool preferences::message_private ( )

Definition at line 850 of file game.cpp.

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

◆ middle_click_scrolls()

bool preferences::middle_click_scrolls ( )

◆ minimap_draw_terrain()

bool preferences::minimap_draw_terrain ( )

◆ minimap_draw_units()

bool preferences::minimap_draw_units ( )

◆ minimap_draw_villages()

bool preferences::minimap_draw_villages ( )

◆ minimap_movement_coding()

bool preferences::minimap_movement_coding ( )

◆ minimap_terrain_coding()

bool preferences::minimap_terrain_coding ( )

◆ modifications()

const std::vector< std::string > & preferences::modifications ( bool  mp)

◆ mouse_scroll_enabled()

bool preferences::mouse_scroll_enabled ( )

◆ mouse_scroll_threshold()

int preferences::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 890 of file general.cpp.

Referenced by controller_base::handle_scroll(), and preferences::base_manager::~base_manager().

◆ moved_color()

std::string preferences::moved_color ( )

◆ mp_server_warning_disabled()

int preferences::mp_server_warning_disabled ( )

◆ music_on()

bool preferences::music_on ( )

◆ music_volume()

int preferences::music_volume ( )

◆ network_host()

std::string preferences::network_host ( )

Definition at line 389 of file game.cpp.

References get(), and server_list().

Referenced by game_launcher::game_launcher(), and game_launcher::play_multiplayer().

◆ options()

const config & preferences::options ( )

◆ parse_admin_authentication()

void preferences::parse_admin_authentication ( const std::string &  sender,
const std::string &  message 
)

◆ parse_should_show_lobby_join()

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

◆ partial_color()

std::string preferences::partial_color ( )

◆ password()

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

◆ playerlist_group_players()

bool preferences::playerlist_group_players ( )

Definition at line 35 of file lobby.cpp.

References get().

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

◆ random_faction_mode()

std::string preferences::random_faction_mode ( )

◆ random_start_time()

bool preferences::random_start_time ( )

Definition at line 528 of file game.cpp.

References get().

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

◆ registered_users_only()

bool preferences::registered_users_only ( )

Definition at line 463 of file game.cpp.

References get().

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

◆ remember_password()

bool preferences::remember_password ( )

◆ remove_acquaintance()

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

◆ resolution()

point preferences::resolution ( )

◆ sample_rate()

unsigned int preferences::sample_rate ( )

Definition at line 1023 of file general.cpp.

Referenced by sound::init_sound(), and save_sample_rate().

◆ save_acquaintances()

static void preferences::save_acquaintances ( )
static

Definition at line 215 of file game.cpp.

References config::add_child(), config::clear_children(), get_prefs(), and i.

Referenced by add_acquaintance(), and remove_acquaintance().

◆ save_compression_format()

compression::format preferences::save_compression_format ( )

◆ save_credentials()

void preferences::save_credentials ( )

◆ save_hotkeys()

void preferences::save_hotkeys ( )

Definition at line 1000 of file general.cpp.

References hotkey::save_hotkeys().

◆ save_replays()

bool preferences::save_replays ( )

Definition at line 773 of file game.cpp.

References get().

Referenced by campaign_controller::play_game(), and gui2::dialogs::preferences_dialog::post_build().

◆ save_sample_rate()

void preferences::save_sample_rate ( const unsigned int  rate)

Definition at line 1028 of file general.cpp.

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

◆ save_sound_buffer_size()

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

Definition at line 530 of file general.cpp.

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

◆ save_turbo_speed()

void preferences::save_turbo_speed ( const double  speed)

Definition at line 436 of file general.cpp.

Referenced by set_turbo_speed().

◆ scroll_speed()

int preferences::scroll_speed ( )

◆ scroll_to_action()

bool preferences::scroll_to_action ( )

Definition at line 365 of file general.cpp.

Referenced by display::scroll_to_xy().

◆ server_list()

const std::vector< game_config::server_info > & preferences::server_list ( )

◆ set() [1/5]

void preferences::set ( const std::string &  key,
bool  value 
)

Definition at line 182 of file general.cpp.

Referenced by _set_color_cursors(), _set_grid(), _set_lobby_joins(), _set_resolution(), gui2::dialogs::advanced_graphics_options::get_scale_pref(), impl_preferences_set(), save_sound_buffer_size(), set_allow_observers(), set_ask_delete_saves(), preferences::editor::set_auto_update_transitions(), set_autosavemax(), set_blindfold_replay(), set_campaign_server(), set_chat_lines(), set_chat_message_aging(), set_chat_timestamping(), set_countdown(), set_countdown_action_bonus(), set_countdown_init_time(), set_countdown_reservoir_time(), set_countdown_turn_bonus(), set_custom_command(), set_delete_saves(), set_disable_auto_moves(), preferences::editor::set_draw_hex_coordinates(), preferences::editor::set_draw_num_of_bitmaps(), preferences::editor::set_draw_terrain_codes(), set_ellipses(), set_enable_whiteboard_mode_on_start(), set_era(), set_fi_friends_in_game(), set_fi_invert(), set_fi_text(), set_fi_vacant_slots(), set_filter_lobby(), set_fog(), set_gui_theme(), set_hide_whiteboard(), set_interrupt_when_ally_sighted(), set_language(), set_level(), set_level_type(), set_login(), set_modifications(), set_mp_server_program_name(), set_mp_server_warning_disabled(), set_music(), set_network_host(), gui2::dialogs::set_pref_and_button(), set_random_faction_mode(), set_random_start_time(), set_registered_users_only(), set_remember_password(), set_save_replays(), set_show_all_units_in_help(), set_show_floating_labels(), set_show_haloes(), set_show_side_colors(), set_shroud(), set_shuffle_sides(), set_skip_ai_moves(), set_skip_mp_replay(), set_sound(), set_stop_music_in_background(), set_theme(), set_turn_bell(), set_turn_dialog(), set_turns(), set_UI_sound(), set_use_map_settings(), set_village_gold(), set_village_support(), set_whisper_friends_only(), set_xp_modifier(), gui2::dialogs::setup_item(), gui2::dialogs::setup_pref_toggle_button(), gui2::dialogs::advanced_graphics_options::update_scale_case(), and preferences::manager::~manager().

◆ set() [2/5]

void preferences::set ( const std::string &  key,
int  value 
)

Definition at line 187 of file general.cpp.

◆ set() [3/5]

void preferences::set ( const std::string &  key,
char const *  value 
)

Definition at line 192 of file general.cpp.

◆ set() [4/5]

void preferences::set ( const std::string &  key,
const std::string &  value 
)

Definition at line 197 of file general.cpp.

◆ set() [5/5]

void preferences::set ( const std::string &  key,
const config::attribute_value value 
)

Definition at line 202 of file general.cpp.

◆ set_allied_color()

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

Definition at line 311 of file general.cpp.

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

◆ set_allow_observers()

void preferences::set_allow_observers ( bool  value)

Definition at line 458 of file game.cpp.

References set().

◆ set_animate_map()

void preferences::set_animate_map ( bool  value)

◆ set_animate_water()

void preferences::set_animate_water ( bool  value)

Definition at line 960 of file general.cpp.

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

◆ set_ask_delete_saves()

void preferences::set_ask_delete_saves ( bool  value)

Definition at line 788 of file game.cpp.

References set().

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

◆ set_auto_open_whisper_windows()

void preferences::set_auto_open_whisper_windows ( bool  v)

◆ set_autosavemax()

void preferences::set_autosavemax ( int  value)

Definition at line 813 of file game.cpp.

References set().

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

◆ set_bell_volume()

void preferences::set_bell_volume ( int  vol)

Definition at line 582 of file general.cpp.

References bell_volume(), and sound::set_bell_volume().

◆ set_blindfold_replay()

void preferences::set_blindfold_replay ( bool  value)

Definition at line 609 of file game.cpp.

References set().

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

◆ set_campaign_server()

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

Definition at line 413 of file game.cpp.

References set().

◆ set_chat_lines()

void preferences::set_chat_lines ( int  lines)

Definition at line 917 of file game.cpp.

References set().

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

◆ set_chat_message_aging()

void preferences::set_chat_message_aging ( const int  aging)

Definition at line 922 of file game.cpp.

References set().

◆ set_chat_timestamping()

void preferences::set_chat_timestamping ( bool  value)

Definition at line 908 of file game.cpp.

References set().

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

◆ set_child()

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

◆ set_color_cursors()

void preferences::set_color_cursors ( bool  value)

Definition at line 79 of file display.cpp.

References _set_color_cursors(), and cursor::set().

Referenced by set_preference_display_settings().

◆ set_core_id()

void preferences::set_core_id ( const std::string &  core_id)

◆ set_countdown()

void preferences::set_countdown ( bool  value)

Definition at line 619 of file game.cpp.

References set().

◆ set_countdown_action_bonus()

void preferences::set_countdown_action_bonus ( int  value)

Definition at line 663 of file game.cpp.

References set().

◆ set_countdown_init_time()

void preferences::set_countdown_init_time ( int  value)

Definition at line 630 of file game.cpp.

References set().

◆ set_countdown_reservoir_time()

void preferences::set_countdown_reservoir_time ( int  value)

Definition at line 641 of file game.cpp.

References set().

◆ set_countdown_turn_bonus()

void preferences::set_countdown_turn_bonus ( int  value)

Definition at line 652 of file game.cpp.

References set().

◆ set_custom_command()

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

Definition at line 952 of file game.cpp.

References set().

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

◆ set_damage_prediction_allow_monte_carlo_simulation()

void preferences::set_damage_prediction_allow_monte_carlo_simulation ( bool  value)

Definition at line 1074 of file general.cpp.

◆ set_delete_saves()

void preferences::set_delete_saves ( bool  value)

Definition at line 778 of file game.cpp.

References set().

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

◆ set_disable_auto_moves()

void preferences::set_disable_auto_moves ( bool  value)

Definition at line 1054 of file general.cpp.

References set().

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

◆ set_disable_loadingscreen_animation()

void preferences::set_disable_loadingscreen_animation ( bool  value)

Definition at line 1064 of file general.cpp.

◆ set_draw_delay()

void preferences::set_draw_delay ( int  value)

Definition at line 980 of file general.cpp.

Referenced by game_launcher::game_launcher().

◆ set_ellipses()

void preferences::set_ellipses ( bool  ison)

Definition at line 502 of file general.cpp.

References set().

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

◆ set_enable_whiteboard_mode_on_start()

void preferences::set_enable_whiteboard_mode_on_start ( bool  value)

Definition at line 433 of file game.cpp.

References set().

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

◆ set_enemy_color()

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

Definition at line 331 of file general.cpp.

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

◆ set_era()

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

Definition at line 703 of file game.cpp.

References set().

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

◆ set_fi_friends_in_game()

void preferences::set_fi_friends_in_game ( bool  value)

Definition at line 75 of file lobby.cpp.

References set().

◆ set_fi_invert()

void preferences::set_fi_invert ( bool  value)

Definition at line 55 of file lobby.cpp.

References set().

◆ set_fi_text()

void preferences::set_fi_text ( const std::string &  search_string)

Definition at line 85 of file lobby.cpp.

References set().

◆ set_fi_vacant_slots()

void preferences::set_fi_vacant_slots ( bool  value)

Definition at line 65 of file lobby.cpp.

References set().

◆ set_filter_lobby()

void preferences::set_filter_lobby ( bool  value)

Definition at line 45 of file lobby.cpp.

References set().

◆ set_fog()

void preferences::set_fog ( bool  value)

Definition at line 543 of file game.cpp.

References set().

◆ set_font_scaling()

void preferences::set_font_scaling ( int  scale)

Definition at line 447 of file general.cpp.

References utils::clamp().

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

◆ set_grid()

void preferences::set_grid ( bool  ison)

◆ set_gui_theme()

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

Definition at line 492 of file general.cpp.

References set().

◆ set_hide_whiteboard()

void preferences::set_hide_whiteboard ( bool  value)

Definition at line 443 of file game.cpp.

References set().

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

◆ set_idle_anim()

void preferences::set_idle_anim ( bool  ison)

◆ set_idle_anim_rate()

void preferences::set_idle_anim_rate ( int  rate)

◆ set_interrupt_when_ally_sighted()

void preferences::set_interrupt_when_ally_sighted ( bool  value)

Definition at line 798 of file game.cpp.

References set().

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

◆ set_language()

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

Definition at line 482 of file general.cpp.

References set().

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

◆ set_level()

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

◆ set_level_type()

void preferences::set_level_type ( int  value)

Definition at line 723 of file game.cpp.

References set().

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

◆ set_login()

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

◆ set_message_private()

void preferences::set_message_private ( bool  value)

◆ set_modifications()

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

◆ set_moved_color()

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

Definition at line 341 of file general.cpp.

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

◆ set_mp_server_program_name()

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

Definition at line 511 of file game.cpp.

References clear(), and set().

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

◆ set_mp_server_warning_disabled()

void preferences::set_mp_server_warning_disabled ( int  value)

Definition at line 506 of file game.cpp.

References set().

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

◆ set_music()

bool preferences::set_music ( bool  ison)

◆ set_music_volume()

void preferences::set_music_volume ( int  vol)

Definition at line 552 of file general.cpp.

References music_volume(), and sound::set_music_volume().

Referenced by preferences::manager::manager().

◆ set_network_host()

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

Definition at line 399 of file game.cpp.

References set().

Referenced by game_launcher::play_multiplayer().

◆ set_options()

void preferences::set_options ( const config values)

Definition at line 588 of file game.cpp.

References set_child().

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

◆ set_partial_color()

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

Definition at line 361 of file general.cpp.

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

◆ set_password()

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

◆ set_preference_display_settings()

void preferences::set_preference_display_settings ( )

◆ set_random_faction_mode()

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

Definition at line 487 of file game.cpp.

References set().

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

◆ set_random_start_time()

void preferences::set_random_start_time ( bool  value)

Definition at line 533 of file game.cpp.

References set().

◆ set_registered_users_only()

void preferences::set_registered_users_only ( bool  value)

Definition at line 468 of file game.cpp.

References set().

◆ set_remember_password()

void preferences::set_remember_password ( bool  remember)

◆ set_save_replays()

void preferences::set_save_replays ( bool  value)

Definition at line 768 of file game.cpp.

References set().

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

◆ set_scroll_speed()

void preferences::set_scroll_speed ( const int  new_speed)

Definition at line 869 of file general.cpp.

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

◆ set_scroll_to_action()

void preferences::set_scroll_to_action ( bool  ison)

Definition at line 370 of file general.cpp.

◆ set_show_all_units_in_help()

void preferences::set_show_all_units_in_help ( bool  value)

Definition at line 936 of file game.cpp.

References set().

◆ set_show_allied_orb()

void preferences::set_show_allied_orb ( bool  show_orb)

Definition at line 261 of file general.cpp.

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

◆ set_show_enemy_orb()

void preferences::set_show_enemy_orb ( bool  show_orb)

Definition at line 268 of file general.cpp.

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

◆ set_show_floating_labels()

void preferences::set_show_floating_labels ( bool  value)

Definition at line 845 of file game.cpp.

References set().

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

◆ set_show_fps()

void preferences::set_show_fps ( bool  value)

Definition at line 970 of file general.cpp.

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

◆ set_show_haloes()

void preferences::set_show_haloes ( bool  value)

Definition at line 865 of file game.cpp.

References set().

Referenced by preferences::manager::manager().

◆ set_show_moved_orb()

void preferences::set_show_moved_orb ( bool  show_orb)

Definition at line 275 of file general.cpp.

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

◆ set_show_partial_orb()

void preferences::set_show_partial_orb ( bool  show_orb)

Definition at line 289 of file general.cpp.

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

◆ set_show_side_colors()

void preferences::set_show_side_colors ( bool  value)

Definition at line 758 of file game.cpp.

References set().

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

◆ set_show_standing_animations()

void preferences::set_show_standing_animations ( bool  value)

Definition at line 107 of file display.cpp.

References d, and display::get_singleton().

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

◆ set_show_unmoved_orb()

void preferences::set_show_unmoved_orb ( bool  show_orb)

Definition at line 282 of file general.cpp.

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

◆ set_shroud()

void preferences::set_shroud ( bool  value)

Definition at line 553 of file game.cpp.

References set().

◆ set_shuffle_sides()

void preferences::set_shuffle_sides ( bool  value)

Definition at line 478 of file game.cpp.

References set().

◆ set_skip_ai_moves()

void preferences::set_skip_ai_moves ( bool  value)

Definition at line 753 of file game.cpp.

References set().

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

◆ set_skip_mp_replay()

void preferences::set_skip_mp_replay ( bool  value)

Definition at line 599 of file game.cpp.

References set().

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

◆ set_sound()

bool preferences::set_sound ( bool  ison)

◆ set_sound_volume()

void preferences::set_sound_volume ( int  vol)

Definition at line 567 of file general.cpp.

References sound::set_sound_volume(), and sound_volume().

Referenced by preferences::manager::manager().

◆ set_stop_music_in_background()

void preferences::set_stop_music_in_background ( bool  ison)

Definition at line 714 of file general.cpp.

References set().

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

◆ set_theme()

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

Definition at line 833 of file game.cpp.

References set().

Referenced by display::get_theme(), game_lua_kernel::impl_game_config_set(), and show_theme_dialog().

◆ set_turbo()

void preferences::set_turbo ( bool  ison)

◆ set_turbo_speed()

void preferences::set_turbo_speed ( double  speed)

◆ set_turn_bell()

bool preferences::set_turn_bell ( bool  ison)

◆ set_turn_dialog()

void preferences::set_turn_dialog ( bool  ison)

Definition at line 423 of file game.cpp.

References set().

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

◆ set_turns()

void preferences::set_turns ( int  value)

Definition at line 563 of file game.cpp.

References set().

◆ set_UI_sound()

bool preferences::set_UI_sound ( bool  ison)

◆ set_UI_volume()

void preferences::set_UI_volume ( int  vol)

Definition at line 597 of file general.cpp.

References sound::set_UI_volume(), and UI_volume().

◆ set_unmoved_color()

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

Definition at line 351 of file general.cpp.

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

◆ set_use_map_settings()

void preferences::set_use_map_settings ( bool  value)

Definition at line 496 of file game.cpp.

References set().

◆ set_use_twelve_hour_clock_format()

void preferences::set_use_twelve_hour_clock_format ( bool  value)

◆ set_village_gold()

void preferences::set_village_gold ( int  value)

Definition at line 673 of file game.cpp.

References set().

◆ set_village_support()

void preferences::set_village_support ( int  value)

Definition at line 683 of file game.cpp.

References set().

◆ set_whisper_friends_only()

void preferences::set_whisper_friends_only ( bool  v)

Definition at line 25 of file lobby.cpp.

References set().

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

◆ set_xp_modifier()

void preferences::set_xp_modifier ( int  value)

Definition at line 693 of file game.cpp.

References set().

◆ show_all_units_in_help()

bool preferences::show_all_units_in_help ( )

Definition at line 932 of file game.cpp.

References get().

Referenced by help::description_type().

◆ show_allied_orb()

bool preferences::show_allied_orb ( )

Definition at line 258 of file general.cpp.

References game_config::show_ally_orb.

Referenced by unit_drawer::redraw_unit().

◆ show_combat()

bool preferences::show_combat ( )

◆ show_enemy_orb()

bool preferences::show_enemy_orb ( )

Definition at line 265 of file general.cpp.

References game_config::show_enemy_orb.

Referenced by unit_drawer::redraw_unit().

◆ show_floating_labels()

bool preferences::show_floating_labels ( )

Definition at line 840 of file game.cpp.

References get().

Referenced by game_display::float_label(), and gui2::dialogs::preferences_dialog::post_build().

◆ show_fps()

bool preferences::show_fps ( )

Definition at line 965 of file general.cpp.

Referenced by events::console_handler::do_fps(), and display::update_display().

◆ show_haloes()

bool preferences::show_haloes ( )

Definition at line 860 of file game.cpp.

Referenced by display::draw(), halo::halo_impl::render(), and halo::halo_impl::unrender().

◆ show_moved_orb()

bool preferences::show_moved_orb ( )

Definition at line 272 of file general.cpp.

References game_config::show_moved_orb.

Referenced by unit_drawer::redraw_unit().

◆ show_partial_orb()

bool preferences::show_partial_orb ( )

Definition at line 286 of file general.cpp.

References game_config::show_partial_orb.

Referenced by unit_drawer::redraw_unit().

◆ show_side_colors()

bool preferences::show_side_colors ( )

Definition at line 763 of file game.cpp.

References get().

Referenced by gui2::dialogs::preferences_dialog::post_build(), and unit_drawer::redraw_unit().

◆ show_standing_animations()

bool preferences::show_standing_animations ( )

◆ show_theme_dialog()

bool preferences::show_theme_dialog ( )

◆ show_unmoved_orb()

bool preferences::show_unmoved_orb ( )

Definition at line 279 of file general.cpp.

References game_config::show_unmoved_orb.

Referenced by unit_drawer::redraw_unit().

◆ show_wesnothd_server_search()

void preferences::show_wesnothd_server_search ( )

◆ shroud()

bool preferences::shroud ( )

◆ shuffle_sides()

bool preferences::shuffle_sides ( )

◆ skip_ai_moves()

bool preferences::skip_ai_moves ( )

◆ skip_mp_replay()

bool preferences::skip_mp_replay ( )

Definition at line 594 of file game.cpp.

References get().

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

◆ sound_buffer_size()

std::size_t preferences::sound_buffer_size ( )

Definition at line 517 of file general.cpp.

Referenced by sound::init_sound().

◆ sound_on()

bool preferences::sound_on ( )

◆ sound_volume()

int preferences::sound_volume ( )

◆ stop_music_in_background()

bool preferences::stop_music_in_background ( )

◆ theme()

std::string preferences::theme ( )

Definition at line 818 of file game.cpp.

References get(), and CVideo::get_singleton().

Referenced by controller_base::get_theme(), display::set_theme(), and show_theme_dialog().

◆ toggle_minimap_draw_terrain()

void preferences::toggle_minimap_draw_terrain ( )

Definition at line 950 of file general.cpp.

References minimap_draw_terrain().

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

◆ toggle_minimap_draw_units()

void preferences::toggle_minimap_draw_units ( )

Definition at line 930 of file general.cpp.

References minimap_draw_units().

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

◆ toggle_minimap_draw_villages()

void preferences::toggle_minimap_draw_villages ( )

Definition at line 940 of file general.cpp.

References minimap_draw_villages().

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

◆ toggle_minimap_movement_coding()

void preferences::toggle_minimap_movement_coding ( )

Definition at line 910 of file general.cpp.

References minimap_movement_coding().

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

◆ toggle_minimap_terrain_coding()

void preferences::toggle_minimap_terrain_coding ( )

Definition at line 920 of file general.cpp.

References minimap_terrain_coding().

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

◆ turbo()

bool preferences::turbo ( )

◆ turbo_speed()

double preferences::turbo_speed ( )

◆ turn_bell()

bool preferences::turn_bell ( )

◆ turn_dialog()

bool preferences::turn_dialog ( )

◆ turns()

int preferences::turns ( )

◆ UI_sound_on()

bool preferences::UI_sound_on ( )

◆ UI_volume()

int preferences::UI_volume ( )

Definition at line 592 of file general.cpp.

Referenced by sound::init_sound(), and set_UI_volume().

◆ unmoved_color()

std::string preferences::unmoved_color ( )

◆ use_color_cursors()

bool preferences::use_color_cursors ( )

Definition at line 985 of file general.cpp.

◆ use_map_settings()

bool preferences::use_map_settings ( )

◆ use_twelve_hour_clock_format()

bool preferences::use_twelve_hour_clock_format ( )

◆ village_gold()

int preferences::village_gold ( )

Definition at line 668 of file game.cpp.

References get(), and settings::get_village_gold().

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

◆ village_support()

int preferences::village_support ( )

Definition at line 678 of file game.cpp.

References get(), and settings::get_village_support().

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

◆ whisper_friends_only()

bool preferences::whisper_friends_only ( )

◆ write_preferences()

void preferences::write_preferences ( )

◆ xp_modifier()

int preferences::xp_modifier ( )

Definition at line 688 of file game.cpp.

References get(), and settings::get_xp_modifier().

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

◆ yellow_confirm()

bool preferences::yellow_confirm ( )

Definition at line 975 of file game.cpp.

References get().

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

Variable Documentation

◆ def_window_height

const int preferences::def_window_height = 720

Definition at line 71 of file general.cpp.

◆ def_window_width

const int preferences::def_window_width = 1280

Definition at line 70 of file general.cpp.

◆ default_scaling_algorithm

const SCALING_ALGORITHM preferences::default_scaling_algorithm = SCALING_ALGORITHM::XBRZ_NN

◆ event_handler_

prefs_event_handler preferences::event_handler_

Definition at line 85 of file general.cpp.

◆ INFINITE_AUTO_SAVES

const int preferences::INFINITE_AUTO_SAVES = 61

◆ max_font_scaling

const int preferences::max_font_scaling = 150

Definition at line 74 of file general.cpp.

Referenced by font_scaling().

◆ min_font_scaling

const int preferences::min_font_scaling = 80

Definition at line 73 of file general.cpp.

◆ min_window_height

const int preferences::min_window_height = 600

Definition at line 68 of file general.cpp.

Referenced by CVideo::get_available_resolutions(), and CVideo::init_window().

◆ min_window_width

const int preferences::min_window_width = 800

Definition at line 67 of file general.cpp.

Referenced by CVideo::get_available_resolutions(), and CVideo::init_window().

◆ pef_view_map

std::map<PREFERENCE_VIEW, std::pair<int,int> > preferences::pef_view_map
static
Initial value:

Map containing page mappings that can be used to set the initially displayed page of the dialog.

The pair is in an 0-indexed toplevel stack/substack format, where the first is the list of main Preference categories (such as General and Display) and the second is any sub-stack found on that page.

TODO: this isn't the most optimal solution, since if the order or number of pages in either stack changes, this map needs to be updated. Optimally the stacked_widget widget would allow specifying page by string id, but that would require changes to generator. It's something to look into, however.

Definition at line 53 of file preferences_dialog.hpp.

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