The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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_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)
 
unsigned int get_ping_timeout ()
 
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 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)
 
size_t sound_buffer_size ()
 
void save_sound_buffer_size (const 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_standing_animations ()
 
void set_show_standing_animations (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_sort_relation ()
 
void set_playerlist_sort_relation (bool v)
 
bool playerlist_sort_name ()
 
void set_playerlist_sort_name (bool v)
 
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 initally 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 = 1024
 
const int def_window_height = 768
 
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

Enumerator
SHOW_NONE 
SHOW_FRIENDS 
SHOW_ALL 

Definition at line 64 of file game.hpp.

Enumerator
VIEW_DEFAULT 
VIEW_FRIENDS 

Definition at line 36 of file preferences_dialog.hpp.

Function Documentation

void preferences::_set_color_cursors ( bool  value)

Definition at line 999 of file general.cpp.

References set().

Referenced by set_color_cursors().

void preferences::_set_fullscreen ( bool  ison)

Definition at line 411 of file general.cpp.

Referenced by CVideo::set_fullscreen().

void preferences::_set_grid ( bool  ison)

Definition at line 511 of file general.cpp.

References set().

Referenced by set_grid().

void preferences::_set_idle_anim ( const bool  ison)

Definition at line 461 of file general.cpp.

Referenced by set_idle_anim().

void preferences::_set_idle_anim_rate ( const int  rate)

Definition at line 471 of file general.cpp.

Referenced by set_idle_anim_rate().

void preferences::_set_lobby_joins ( int  show)

Definition at line 358 of file game.cpp.

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

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

void preferences::_set_maximized ( bool  ison)
void preferences::_set_resolution ( const point res)
void preferences::_set_turbo ( bool  ison)

Definition at line 425 of file general.cpp.

Referenced by set_turbo().

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

Definition at line 1020 of file general.cpp.

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

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

Definition at line 315 of file game.cpp.

Referenced by game_launcher::launch_game().

std::string preferences::allied_color ( )
bool preferences::allow_observers ( )

Definition at line 455 of file game.cpp.

References get().

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

bool preferences::animate_map ( )
bool preferences::animate_water ( )
bool preferences::ask_delete_saves ( )
bool preferences::auto_open_whisper_windows ( )

Definition at line 31 of file lobby.cpp.

References get().

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

int preferences::autosavemax ( )
int preferences::bell_volume ( )
bool preferences::blindfold_replay ( )

Definition at line 606 of file game.cpp.

References get().

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

std::string preferences::campaign_server ( )

Definition at line 406 of file game.cpp.

References get().

Referenced by ad_hoc_addon_fetch_session(), and manage_addons().

int preferences::chat_lines ( )
int preferences::chat_message_aging ( )

Definition at line 929 of file game.cpp.

References get().

Referenced by display_chat_manager::prune_chat_messages().

bool preferences::chat_timestamping ( )

Definition at line 906 of file game.cpp.

References get().

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

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

Definition at line 1014 of file general.cpp.

References hotkey::reset_default_hotkeys().

bool preferences::confirm_load_save_from_different_version ( )

Definition at line 1048 of file general.cpp.

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

bool preferences::confirm_no_moves ( )

Definition at line 982 of file game.cpp.

References get().

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

std::string preferences::core_id ( )
bool preferences::countdown ( )

Definition at line 616 of file game.cpp.

References get().

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

int preferences::countdown_action_bonus ( )

Definition at line 659 of file game.cpp.

References get().

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

int preferences::countdown_init_time ( )

Definition at line 626 of file game.cpp.

References get().

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

int preferences::countdown_reservoir_time ( )

Definition at line 637 of file game.cpp.

References get().

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

int preferences::countdown_turn_bonus ( )

Definition at line 648 of file game.cpp.

References get().

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

std::string preferences::custom_command ( )

Definition at line 950 of file game.cpp.

References get().

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

bool preferences::damage_prediction_allow_monte_carlo_simulation ( )

Definition at line 1078 of file general.cpp.

Referenced by combatant::fight().

bool preferences::delete_saves ( )

Definition at line 785 of file game.cpp.

References get().

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

bool preferences::disable_auto_moves ( )
bool preferences::disable_loadingscreen_animation ( )

Definition at line 1068 of file general.cpp.

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

void preferences::disable_preferences_save ( )

Definition at line 248 of file general.cpp.

Referenced by game_launcher::game_launcher().

int preferences::draw_delay ( )
bool preferences::ellipses ( )

Definition at line 496 of file general.cpp.

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

void preferences::enable_mouse_scroll ( bool  value)

Definition at line 884 of file general.cpp.

References set().

Referenced by hotkey::execute_command().

bool preferences::enable_whiteboard_mode_on_start ( )

Definition at line 430 of file game.cpp.

References get().

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

void preferences::encounter_all_content ( const game_board gameboard_)
void preferences::encounter_map_terrain ( const gamemap map)
void preferences::encounter_recallable_units ( std::vector< team > &  teams)
static void preferences::encounter_recallable_units ( const std::vector< team > &  teams)
static

Definition at line 1005 of file game.cpp.

References t.

Referenced by encounter_all_content().

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

Definition at line 990 of file game.cpp.

Referenced by encounter_all_content().

void preferences::encounter_start_units ( const unit_map units)

Definition at line 998 of file game.cpp.

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

Referenced by encounter_all_content().

std::set< t_translation::terrain_code > & preferences::encountered_terrains ( )
std::set< std::string > & preferences::encountered_units ( )
std::string preferences::enemy_color ( )
std::string preferences::era ( )
void preferences::erase ( const std::string &  key)
bool preferences::fi_friends_in_game ( )

Definition at line 91 of file lobby.cpp.

References get().

bool preferences::fi_invert ( )

Definition at line 71 of file lobby.cpp.

References get().

std::string preferences::fi_text ( )

Definition at line 101 of file lobby.cpp.

References get().

bool preferences::fi_vacant_slots ( )

Definition at line 81 of file lobby.cpp.

References get().

bool preferences::filter_lobby ( )

Definition at line 61 of file lobby.cpp.

References get().

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().

bool preferences::fog ( )

Definition at line 540 of file game.cpp.

References get().

Referenced by ng::configure_engine::fog_game_default(), and gui2::dialogs::mp_create_game::pre_show().

int preferences::font_scaled ( int  size)
int preferences::font_scaling ( )

Definition at line 440 of file general.cpp.

References max_font_scaling.

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

bool preferences::fullscreen ( )
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(), confirm_no_moves(), countdown(), countdown_action_bonus(), countdown_init_time(), countdown_reservoir_time(), countdown_turn_bonus(), custom_command(), preferences::editor::default_dir(), delete_saves(), 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(), get_ping_timeout(), 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(), playerlist_sort_name(), playerlist_sort_relation(), random_faction_mode(), random_start_time(), registered_users_only(), remember_password(), save_compression_format(), save_replays(), 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().

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

Definition at line 234 of file general.cpp.

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

Definition at line 238 of file general.cpp.

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

Definition at line 231 of file game.cpp.

References i, and load_acquaintances().

Referenced by play_controller::tab().

const config & preferences::get_alias ( )

Definition at line 1027 of file general.cpp.

References get_child().

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

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

Definition at line 243 of file general.cpp.

Referenced by impl_preferences_get().

std::string preferences::get_chat_timestamp ( const time_t &  t)
const config & preferences::get_child ( const std::string &  key)
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 964 of file game.cpp.

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

std::string preferences::get_mp_server_program_name ( )

Definition at line 525 of file game.cpp.

References get().

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

unsigned int preferences::get_ping_timeout ( )

Definition at line 401 of file game.cpp.

References get().

config * preferences::get_prefs ( )

Definition at line 252 of file general.cpp.

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

bool preferences::green_confirm ( )

Definition at line 968 of file game.cpp.

References get().

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

bool preferences::grid ( )
std::string preferences::gui_theme ( )

Definition at line 486 of file general.cpp.

Referenced by gui2::load_settings().

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

Definition at line 226 of file general.cpp.

bool preferences::hide_whiteboard ( )

Definition at line 440 of file game.cpp.

References get().

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

bool preferences::idle_anim ( )

Definition at line 456 of file general.cpp.

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

int preferences::idle_anim_rate ( )

Definition at line 466 of file general.cpp.

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

bool preferences::interrupt_when_ally_sighted ( )

Definition at line 805 of file game.cpp.

References get().

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

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

Definition at line 323 of file game.cpp.

bool preferences::is_friend ( const std::string &  nick)
bool preferences::is_ignored ( const std::string &  nick)
int preferences::joystick_cursor_deadzone ( )

Definition at line 763 of file general.cpp.

Referenced by joystick_manager::update_highlighted_hex().

int preferences::joystick_cursor_threshold ( )

Definition at line 781 of file general.cpp.

Referenced by joystick_manager::update_highlighted_hex().

int preferences::joystick_cursor_xaxis_num ( )
int preferences::joystick_cursor_yaxis_num ( )
int preferences::joystick_mouse_deadzone ( )

Definition at line 727 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

int preferences::joystick_mouse_xaxis_num ( )

Definition at line 739 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

int preferences::joystick_mouse_yaxis_num ( )

Definition at line 751 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

int preferences::joystick_num_cursor_xaxis ( )
int preferences::joystick_num_cursor_yaxis ( )
int preferences::joystick_num_mouse_xaxis ( )

Definition at line 733 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

int preferences::joystick_num_mouse_yaxis ( )

Definition at line 745 of file general.cpp.

Referenced by joystick_manager::get_mouse_axis_pair().

int preferences::joystick_num_scroll_xaxis ( )

Definition at line 787 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

int preferences::joystick_num_scroll_yaxis ( )

Definition at line 799 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

int preferences::joystick_num_thrusta_axis ( )

Definition at line 835 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

int preferences::joystick_num_thrustb_axis ( )

Definition at line 847 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

int preferences::joystick_scroll_deadzone ( )

Definition at line 757 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

int preferences::joystick_scroll_xaxis_num ( )

Definition at line 793 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

int preferences::joystick_scroll_yaxis_num ( )

Definition at line 805 of file general.cpp.

Referenced by joystick_manager::get_scroll_axis_pair().

bool preferences::joystick_support_enabled ( )
int preferences::joystick_thrusta_axis_num ( )

Definition at line 841 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

int preferences::joystick_thrusta_deadzone ( )

Definition at line 769 of file general.cpp.

Referenced by joystick_manager::get_thrusta_axis().

int preferences::joystick_thrustb_axis_num ( )

Definition at line 853 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

int preferences::joystick_thrustb_deadzone ( )

Definition at line 775 of file general.cpp.

Referenced by joystick_manager::get_thrustb_axis().

std::string preferences::language ( )

Definition at line 476 of file general.cpp.

Referenced by get_locale().

std::string preferences::level ( )

Definition at line 710 of file game.cpp.

References get().

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

int preferences::level_type ( )

Definition at line 720 of file game.cpp.

References get().

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

static void preferences::load_acquaintances ( )
static
void preferences::load_credentials ( )
void preferences::load_hotkeys ( )

Definition at line 1004 of file general.cpp.

References hotkey::load_hotkeys().

Referenced by do_gameloop().

int preferences::lobby_joins ( )
std::string preferences::login ( )
preferences::MAKE_ENUM ( SCALING_ALGORITHM  ,
(LINEAR,"linear")(NEAREST_NEIGHBOR,"nn")(XBRZ_LIN,"xbrzlin")(XBRZ_NN,"xbrznn")   
) const
bool preferences::maximized ( )

Definition at line 390 of file general.cpp.

References fullscreen().

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

bool preferences::message_bell ( )

Definition at line 654 of file general.cpp.

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

bool preferences::message_private ( )

Definition at line 852 of file game.cpp.

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

bool preferences::middle_click_scrolls ( )
bool preferences::minimap_draw_terrain ( )
bool preferences::minimap_draw_units ( )
bool preferences::minimap_draw_villages ( )
bool preferences::minimap_movement_coding ( )
bool preferences::minimap_terrain_coding ( )
const std::vector< std::string > & preferences::modifications ( bool  mp)
bool preferences::mouse_scroll_enabled ( )

Definition at line 879 of file general.cpp.

Referenced by hotkey::execute_command(), and controller_base::handle_scroll().

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 889 of file general.cpp.

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

std::string preferences::moved_color ( )
int preferences::mp_server_warning_disabled ( )
bool preferences::music_on ( )
int preferences::music_volume ( )
std::string preferences::network_host ( )

Definition at line 386 of file game.cpp.

References get(), and server_list().

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

const config & preferences::options ( )
void preferences::parse_admin_authentication ( const std::string &  sender,
const std::string &  message 
)
bool preferences::parse_should_show_lobby_join ( const std::string &  sender,
const std::string &  message 
)
std::string preferences::partial_color ( )
std::string preferences::password ( const std::string &  server,
const std::string &  login 
)
bool preferences::playerlist_group_players ( )

Definition at line 56 of file lobby.cpp.

References get().

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

bool preferences::playerlist_sort_name ( )

Definition at line 46 of file lobby.cpp.

References get().

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

bool preferences::playerlist_sort_relation ( )

Definition at line 36 of file lobby.cpp.

References get().

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

std::string preferences::random_faction_mode ( )
bool preferences::random_start_time ( )

Definition at line 530 of file game.cpp.

References get().

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

bool preferences::registered_users_only ( )

Definition at line 465 of file game.cpp.

References get().

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

bool preferences::remember_password ( )
bool preferences::remove_acquaintance ( const std::string &  nick)
point preferences::resolution ( )
unsigned int preferences::sample_rate ( )

Definition at line 1032 of file general.cpp.

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

static void preferences::save_acquaintances ( )
static

Definition at line 212 of file game.cpp.

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

Referenced by add_acquaintance(), and remove_acquaintance().

compression::format preferences::save_compression_format ( )
void preferences::save_credentials ( )
void preferences::save_hotkeys ( )

Definition at line 1009 of file general.cpp.

References hotkey::save_hotkeys().

bool preferences::save_replays ( )

Definition at line 775 of file game.cpp.

References get().

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

void preferences::save_sample_rate ( const unsigned int  rate)

Definition at line 1037 of file general.cpp.

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

void preferences::save_sound_buffer_size ( const size_t  size)

Definition at line 529 of file general.cpp.

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

void preferences::save_turbo_speed ( const double  speed)

Definition at line 435 of file general.cpp.

Referenced by set_turbo_speed().

int preferences::scroll_speed ( )
bool preferences::scroll_to_action ( )

Definition at line 365 of file general.cpp.

Referenced by display::scroll_to_xy().

const std::vector< game_config::server_info > & preferences::server_list ( )
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(), enable_mouse_scroll(), gui2::dialogs::advanced_graphics_options::get_scale_pref(), impl_preferences_set(), save_sound_buffer_size(), set_allow_observers(), set_animate_map(), set_animate_water(), 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_damage_prediction_allow_monte_carlo_simulation(), set_delete_saves(), set_disable_auto_moves(), set_disable_loadingscreen_animation(), 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(), set_playerlist_sort_name(), set_playerlist_sort_relation(), 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_show_standing_animations(), 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(), toggle_minimap_draw_terrain(), toggle_minimap_draw_units(), toggle_minimap_draw_villages(), toggle_minimap_movement_coding(), toggle_minimap_terrain_coding(), gui2::dialogs::advanced_graphics_options::update_scale_case(), and preferences::manager::~manager().

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

Definition at line 187 of file general.cpp.

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

Definition at line 192 of file general.cpp.

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

Definition at line 197 of file general.cpp.

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

Definition at line 202 of file general.cpp.

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().

void preferences::set_allow_observers ( bool  value)

Definition at line 460 of file game.cpp.

References set().

void preferences::set_animate_map ( bool  value)

Definition at line 954 of file general.cpp.

References set().

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

void preferences::set_animate_water ( bool  value)

Definition at line 959 of file general.cpp.

References set().

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

void preferences::set_ask_delete_saves ( bool  value)

Definition at line 790 of file game.cpp.

References set().

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

void preferences::set_auto_open_whisper_windows ( bool  v)
void preferences::set_autosavemax ( int  value)

Definition at line 815 of file game.cpp.

References set().

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

void preferences::set_bell_volume ( int  vol)

Definition at line 581 of file general.cpp.

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

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

void preferences::set_blindfold_replay ( bool  value)

Definition at line 611 of file game.cpp.

References set().

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

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

Definition at line 415 of file game.cpp.

References set().

void preferences::set_chat_lines ( int  lines)

Definition at line 919 of file game.cpp.

References set().

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

void preferences::set_chat_message_aging ( const int  aging)

Definition at line 924 of file game.cpp.

References set().

void preferences::set_chat_timestamping ( bool  value)

Definition at line 910 of file game.cpp.

References set().

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

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

Definition at line 212 of file general.cpp.

Referenced by set_options(), and preferences::manager::~manager().

void preferences::set_color_cursors ( bool  value)

Definition at line 82 of file display.cpp.

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

Referenced by set_preference_display_settings().

void preferences::set_core_id ( const std::string &  core_id)
void preferences::set_countdown ( bool  value)

Definition at line 621 of file game.cpp.

References set().

void preferences::set_countdown_action_bonus ( int  value)

Definition at line 665 of file game.cpp.

References set().

void preferences::set_countdown_init_time ( int  value)

Definition at line 632 of file game.cpp.

References set().

void preferences::set_countdown_reservoir_time ( int  value)

Definition at line 643 of file game.cpp.

References set().

void preferences::set_countdown_turn_bonus ( int  value)

Definition at line 654 of file game.cpp.

References set().

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

Definition at line 954 of file game.cpp.

References set().

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

void preferences::set_damage_prediction_allow_monte_carlo_simulation ( bool  value)

Definition at line 1083 of file general.cpp.

References set().

void preferences::set_delete_saves ( bool  value)

Definition at line 780 of file game.cpp.

References set().

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

void preferences::set_disable_auto_moves ( bool  value)

Definition at line 1063 of file general.cpp.

References set().

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

void preferences::set_disable_loadingscreen_animation ( bool  value)

Definition at line 1073 of file general.cpp.

References set().

void preferences::set_draw_delay ( int  value)

Definition at line 989 of file general.cpp.

Referenced by game_launcher::game_launcher().

void preferences::set_ellipses ( bool  ison)

Definition at line 501 of file general.cpp.

References set().

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

void preferences::set_enable_whiteboard_mode_on_start ( bool  value)

Definition at line 435 of file game.cpp.

References set().

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

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().

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

Definition at line 705 of file game.cpp.

References set().

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

void preferences::set_fi_friends_in_game ( bool  value)

Definition at line 96 of file lobby.cpp.

References set().

void preferences::set_fi_invert ( bool  value)

Definition at line 76 of file lobby.cpp.

References set().

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

Definition at line 106 of file lobby.cpp.

References set().

void preferences::set_fi_vacant_slots ( bool  value)

Definition at line 86 of file lobby.cpp.

References set().

void preferences::set_filter_lobby ( bool  value)

Definition at line 66 of file lobby.cpp.

References set().

void preferences::set_fog ( bool  value)

Definition at line 545 of file game.cpp.

References set().

void preferences::set_font_scaling ( int  scale)

Definition at line 446 of file general.cpp.

References utils::clamp().

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

void preferences::set_grid ( bool  ison)
void preferences::set_gui_theme ( const std::string &  s)

Definition at line 491 of file general.cpp.

References set().

void preferences::set_hide_whiteboard ( bool  value)

Definition at line 445 of file game.cpp.

References set().

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

void preferences::set_idle_anim ( bool  ison)
void preferences::set_idle_anim_rate ( int  rate)
void preferences::set_interrupt_when_ally_sighted ( bool  value)

Definition at line 800 of file game.cpp.

References set().

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

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

Definition at line 481 of file general.cpp.

References set().

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

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

Definition at line 725 of file game.cpp.

References set().

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

void preferences::set_login ( const std::string &  login)
void preferences::set_message_private ( bool  value)
void preferences::set_modifications ( const std::vector< std::string > &  value,
bool  mp 
)
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().

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

Definition at line 513 of file game.cpp.

References clear(), and set().

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

void preferences::set_mp_server_warning_disabled ( int  value)

Definition at line 508 of file game.cpp.

References set().

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

bool preferences::set_music ( bool  ison)
void preferences::set_music_volume ( int  vol)
void preferences::set_network_host ( const std::string &  host)

Definition at line 396 of file game.cpp.

References set().

Referenced by game_launcher::play_multiplayer().

void preferences::set_options ( const config values)

Definition at line 590 of file game.cpp.

References set_child().

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

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().

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

Definition at line 51 of file lobby.cpp.

References set().

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

void preferences::set_playerlist_sort_relation ( bool  v)

Definition at line 41 of file lobby.cpp.

References set().

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

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

Definition at line 489 of file game.cpp.

References set().

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

void preferences::set_random_start_time ( bool  value)

Definition at line 535 of file game.cpp.

References set().

void preferences::set_registered_users_only ( bool  value)

Definition at line 470 of file game.cpp.

References set().

void preferences::set_remember_password ( bool  remember)
void preferences::set_save_replays ( bool  value)

Definition at line 770 of file game.cpp.

References set().

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

void preferences::set_scroll_speed ( const int  new_speed)

Definition at line 868 of file general.cpp.

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

void preferences::set_scroll_to_action ( bool  ison)

Definition at line 370 of file general.cpp.

void preferences::set_show_all_units_in_help ( bool  value)

Definition at line 938 of file game.cpp.

References set().

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().

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().

void preferences::set_show_floating_labels ( bool  value)

Definition at line 847 of file game.cpp.

References set().

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

void preferences::set_show_fps ( bool  value)

Definition at line 979 of file general.cpp.

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

void preferences::set_show_haloes ( bool  value)

Definition at line 867 of file game.cpp.

References set().

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

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().

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().

void preferences::set_show_side_colors ( bool  value)

Definition at line 760 of file game.cpp.

References set().

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

void preferences::set_show_standing_animations ( bool  value)

Definition at line 969 of file general.cpp.

References set().

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

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().

void preferences::set_shroud ( bool  value)

Definition at line 555 of file game.cpp.

References set().

void preferences::set_shuffle_sides ( bool  value)

Definition at line 480 of file game.cpp.

References set().

void preferences::set_skip_ai_moves ( bool  value)

Definition at line 755 of file game.cpp.

References set().

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

void preferences::set_skip_mp_replay ( bool  value)

Definition at line 601 of file game.cpp.

References set().

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

bool preferences::set_sound ( bool  ison)
void preferences::set_sound_volume ( int  vol)
void preferences::set_stop_music_in_background ( bool  ison)

Definition at line 713 of file general.cpp.

References set().

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

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

Definition at line 835 of file game.cpp.

References set().

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

void preferences::set_turbo ( bool  ison)
void preferences::set_turbo_speed ( double  speed)
bool preferences::set_turn_bell ( bool  ison)
void preferences::set_turn_dialog ( bool  ison)

Definition at line 425 of file game.cpp.

References set().

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

void preferences::set_turns ( int  value)

Definition at line 565 of file game.cpp.

References set().

bool preferences::set_UI_sound ( bool  ison)
void preferences::set_UI_volume ( int  vol)

Definition at line 596 of file general.cpp.

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

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

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().

void preferences::set_use_map_settings ( bool  value)

Definition at line 498 of file game.cpp.

References set().

void preferences::set_use_twelve_hour_clock_format ( bool  value)
void preferences::set_village_gold ( int  value)

Definition at line 675 of file game.cpp.

References set().

void preferences::set_village_support ( int  value)

Definition at line 685 of file game.cpp.

References set().

void preferences::set_whisper_friends_only ( bool  v)

Definition at line 26 of file lobby.cpp.

References set().

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

void preferences::set_xp_modifier ( int  value)

Definition at line 695 of file game.cpp.

References set().

bool preferences::show_all_units_in_help ( )

Definition at line 934 of file game.cpp.

References get().

Referenced by help::description_type().

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().

bool preferences::show_combat ( )
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().

bool preferences::show_floating_labels ( )

Definition at line 842 of file game.cpp.

References get().

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

bool preferences::show_fps ( )

Definition at line 974 of file general.cpp.

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

bool preferences::show_haloes ( )

Definition at line 862 of file game.cpp.

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

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().

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().

bool preferences::show_side_colors ( )

Definition at line 765 of file game.cpp.

References get().

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

bool preferences::show_standing_animations ( )
bool preferences::show_theme_dialog ( )
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().

void preferences::show_wesnothd_server_search ( )
bool preferences::shroud ( )
bool preferences::shuffle_sides ( )
bool preferences::skip_ai_moves ( )
bool preferences::skip_mp_replay ( )

Definition at line 596 of file game.cpp.

References get().

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

size_t preferences::sound_buffer_size ( )

Definition at line 516 of file general.cpp.

Referenced by sound::init_sound().

bool preferences::sound_on ( )
int preferences::sound_volume ( )
bool preferences::stop_music_in_background ( )
std::string preferences::theme ( )

Definition at line 820 of file game.cpp.

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

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

void preferences::toggle_minimap_draw_terrain ( )

Definition at line 949 of file general.cpp.

References minimap_draw_terrain(), and set().

Referenced by hotkey::execute_command().

void preferences::toggle_minimap_draw_units ( )

Definition at line 929 of file general.cpp.

References minimap_draw_units(), and set().

Referenced by hotkey::execute_command().

void preferences::toggle_minimap_draw_villages ( )

Definition at line 939 of file general.cpp.

References minimap_draw_villages(), and set().

Referenced by hotkey::execute_command().

void preferences::toggle_minimap_movement_coding ( )

Definition at line 909 of file general.cpp.

References minimap_movement_coding(), and set().

Referenced by hotkey::execute_command().

void preferences::toggle_minimap_terrain_coding ( )

Definition at line 919 of file general.cpp.

References minimap_terrain_coding(), and set().

Referenced by hotkey::execute_command().

bool preferences::turbo ( )
double preferences::turbo_speed ( )
bool preferences::turn_bell ( )
bool preferences::turn_dialog ( )
int preferences::turns ( )
bool preferences::UI_sound_on ( )
int preferences::UI_volume ( )
std::string preferences::unmoved_color ( )
bool preferences::use_color_cursors ( )

Definition at line 994 of file general.cpp.

Referenced by use_color_cursors().

bool preferences::use_map_settings ( )
bool preferences::use_twelve_hour_clock_format ( )
int preferences::village_gold ( )

Definition at line 670 of file game.cpp.

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

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

int preferences::village_support ( )

Definition at line 680 of file game.cpp.

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

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

bool preferences::whisper_friends_only ( )
void preferences::write_preferences ( )
int preferences::xp_modifier ( )

Definition at line 690 of file game.cpp.

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

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

bool preferences::yellow_confirm ( )

Definition at line 977 of file game.cpp.

References get().

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

Variable Documentation

const int preferences::def_window_height = 768

Definition at line 71 of file general.cpp.

const int preferences::def_window_width = 1024

Definition at line 70 of file general.cpp.

const SCALING_ALGORITHM preferences::default_scaling_algorithm = SCALING_ALGORITHM::XBRZ_NN
prefs_event_handler preferences::event_handler_

Definition at line 85 of file general.cpp.

const int preferences::INFINITE_AUTO_SAVES = 61
const int preferences::max_font_scaling = 150

Definition at line 74 of file general.cpp.

Referenced by font_scaling().

const int preferences::min_font_scaling = 80

Definition at line 73 of file general.cpp.

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().

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().

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 initally 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 52 of file preferences_dialog.hpp.