Modify, read and display user preferences. More...
Namespaces | |
editor | |
Classes | |
class | advanced_manager |
struct | manager |
class | acquaintance |
class | prefs_event_handler |
struct | base_manager |
Typedefs | |
using | advanced_pref_list = std::vector< advanced_manager::option > |
Enumerations | |
enum | PREFERENCE_VIEW { VIEW_DEFAULT , VIEW_FRIENDS } |
enum class | lobby_joins { show_none , show_friends , show_all } |
Functions | |
void | init_advanced_manager (const game_config_view &gc) |
Initializes the manager singleton. More... | |
const advanced_pref_list & | get_advanced_preferences () |
Gets a list of the available advanced preferences. More... | |
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_color_cursors (bool value) |
bool | show_standing_animations () |
void | set_show_standing_animations (bool value) |
bool | show_theme_dialog () |
void | show_wesnothd_server_search () |
void | load_game_prefs () |
static void | load_acquaintances () |
static void | save_acquaintances () |
const std::map< std::string, acquaintance > & | get_acquaintances () |
const std::string | get_ignored_delim () |
std::map< std::string, std::string > | get_acquaintances_nice (const std::string &filter) |
std::pair< preferences::acquaintance *, bool > | add_acquaintance (const std::string &nick, const std::string &mode, const std::string ¬es) |
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) |
lobby_joins | get_lobby_joins () |
void | _set_lobby_joins (lobby_joins show) |
const std::vector< game_config::server_info > & | builtin_servers_list () |
std::vector< game_config::server_info > | user_servers_list () |
void | set_user_servers_list (const std::vector< game_config::server_info > &value) |
std::string | network_host () |
void | set_network_host (const std::string &host) |
std::string | campaign_server () |
void | set_campaign_server (const std::string &host) |
bool | turn_dialog () |
void | set_turn_dialog (bool ison) |
bool | enable_whiteboard_mode_on_start () |
void | set_enable_whiteboard_mode_on_start (bool value) |
bool | hide_whiteboard () |
void | set_hide_whiteboard (bool value) |
bool | show_combat () |
bool | allow_observers () |
void | set_allow_observers (bool value) |
bool | shuffle_sides () |
void | set_shuffle_sides (bool value) |
std::string | random_faction_mode () |
void | set_random_faction_mode (const std::string &value) |
bool | use_map_settings () |
void | set_use_map_settings (bool value) |
int | mp_server_warning_disabled () |
void | set_mp_server_warning_disabled (int value) |
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 config & | options () |
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) |
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) |
optional_const_config | get_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 () |
config * | get_prefs () |
void | load_base_prefs () |
bool | show_ally_orb () |
void | set_show_ally_orb (bool show_orb) |
bool | show_status_on_ally_orb () |
void | set_show_status_on_ally_orb (bool show_orb) |
bool | show_enemy_orb () |
void | set_show_enemy_orb (bool show_orb) |
bool | show_moved_orb () |
void | set_show_moved_orb (bool show_orb) |
bool | show_unmoved_orb () |
void | set_show_unmoved_orb (bool show_orb) |
bool | show_partial_orb () |
void | set_show_partial_orb (bool show_orb) |
bool | show_disengaged_orb () |
void | set_show_disengaged_orb (bool show_orb) |
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 () |
int | pixel_scale () |
void | set_pixel_scale (const int scale) |
bool | auto_pixel_scale () |
void | set_auto_pixel_scale (bool choice) |
bool | maximized () |
bool | fullscreen () |
bool | vsync () |
void | _set_resolution (const point &res) |
void | _set_maximized (bool ison) |
void | _set_fullscreen (bool ison) |
void | set_vsync (bool ison) |
bool | turbo () |
void | set_turbo (bool ison) |
double | turbo_speed () |
void | set_turbo_speed (const double speed) |
int | font_scaling () |
void | set_font_scaling (int scale) |
int | font_scaled (int size) |
int | keepalive_timeout () |
void | keepalive_timeout (int seconds) |
bool | idle_anim () |
void | set_idle_anim (const bool ison) |
double | 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) |
unsigned int | tile_size () |
void | set_tile_size (const unsigned int size) |
bool | turn_bell () |
bool | set_turn_bell (bool ison) |
bool | UI_sound_on () |
bool | set_UI_sound (bool ison) |
bool | message_bell () |
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) |
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) |
optional_const_config | get_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 | damage_prediction_allow_monte_carlo_simulation () |
void | set_damage_prediction_allow_monte_carlo_simulation (bool value) |
std::string | addon_manager_saved_order_name () |
void | set_addon_manager_saved_order_name (const std::string &value) |
sort_order::type | addon_manager_saved_order_direction () |
void | set_addon_manager_saved_order_direction (sort_order::type value) |
std::string | selected_achievement_group () |
void | set_selected_achievement_group (const std::string &content_for) |
bool | achievement (const std::string &content_for, const std::string &id) |
void | set_achievement (const std::string &content_for, const std::string &id) |
Marks the specified achievement as completed. More... | |
int | progress_achievement (const std::string &content_for, const std::string &id, int limit=999999, int max_progress=999999, int amount=0) |
Increments the achievement's current progress by amount if it hasn't already been completed. More... | |
bool | sub_achievement (const std::string &content_for, const std::string &id, const std::string &sub_id) |
void | set_sub_achievement (const std::string &content_for, const std::string &id, const std::string &sub_id) |
Marks the specified sub-achievement as completed. More... | |
void | set_use_twelve_hour_clock_format (bool value) |
bool | whisper_friends_only () |
void | set_whisper_friends_only (bool v) |
bool | auto_open_whisper_windows () |
bool | fi_invert () |
void | set_fi_invert (bool value) |
bool | fi_vacant_slots () |
void | set_fi_vacant_slots (bool value) |
bool | fi_friends_in_game () |
void | set_fi_friends_in_game (bool value) |
bool | fi_blocked_in_game () |
void | set_fi_blocked_in_game (bool value) |
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... | |
static std::unique_ptr< preferences::advanced_manager > | singleton = nullptr |
const int | INFINITE_AUTO_SAVES = 61 |
const int | min_window_width = 800 |
const int | min_window_height = 540 |
const int | def_window_width = 1280 |
const int | def_window_height = 720 |
const int | max_window_width = 1920 |
const int | max_window_height = 1080 |
const int | min_font_scaling = 80 |
const int | max_font_scaling = 150 |
const int | min_pixel_scale = 1 |
const int | max_pixel_scale = 4 |
prefs_event_handler | event_handler_ |
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.
using preferences::advanced_pref_list = typedef std::vector<advanced_manager::option> |
Definition at line 69 of file advanced.hpp.
|
strong |
Enumerator | |
---|---|
VIEW_DEFAULT | |
VIEW_FRIENDS |
Definition at line 36 of file preferences_dialog.hpp.
void preferences::_set_color_cursors | ( | bool | value | ) |
void preferences::_set_fullscreen | ( | bool | ison | ) |
Definition at line 455 of file general.cpp.
Referenced by video::set_fullscreen().
void preferences::_set_lobby_joins | ( | lobby_joins | show | ) |
Definition at line 345 of file game.cpp.
References set(), gui2::dialogs::tip::show(), show_all, show_friends, and show_none.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::_set_maximized | ( | bool | ison | ) |
Definition at line 450 of file general.cpp.
Referenced by game_launcher::game_launcher(), preferences::prefs_event_handler::handle_window_event(), and video::set_resolution().
void preferences::_set_resolution | ( | const point & | res | ) |
Definition at line 444 of file general.cpp.
References set().
Referenced by game_launcher::game_launcher(), preferences::prefs_event_handler::handle_window_event(), and video::set_resolution().
bool preferences::achievement | ( | const std::string & | content_for, |
const std::string & | id | ||
) |
content_for | The achievement group the achievement is part of. |
id | The ID of the achievement within the achievement group. |
Definition at line 1029 of file general.cpp.
References utils::split().
Referenced by achievement_group::achievement_group(), game_lua_kernel::intf_has_achievement(), progress_achievement(), set_sub_achievement(), and sub_achievement().
std::pair< preferences::acquaintance *, bool > preferences::add_acquaintance | ( | const std::string & | nick, |
const std::string & | mode, | ||
const std::string & | notes | ||
) |
Definition at line 227 of file game.cpp.
References utils::isvalid_wildcard(), and save_acquaintances().
Referenced by gui2::dialogs::preferences_dialog::add_friend_list_entry(), gui2::dialogs::lobby_player_info::add_to_friends_button_callback(), gui2::dialogs::lobby_player_info::add_to_ignores_button_callback(), events::chat_command_handler::do_friend(), and events::chat_command_handler::do_ignore().
void preferences::add_alias | ( | const std::string & | alias, |
const std::string & | command | ||
) |
Definition at line 941 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 288 of file game.cpp.
Referenced by campaign_controller::play_game().
sort_order::type preferences::addon_manager_saved_order_direction | ( | ) |
Definition at line 1009 of file general.cpp.
References get(), and string_enums::enum_base< Definition >::get_enum().
Referenced by gui2::dialogs::addon_manager::pre_show().
std::string preferences::addon_manager_saved_order_name | ( | ) |
Definition at line 999 of file general.cpp.
References get().
Referenced by gui2::dialogs::addon_manager::pre_show().
std::string preferences::allied_color | ( | ) |
Definition at line 322 of file general.cpp.
References game_config::colors::ally_orb_color, fix_orb_color_name(), and get().
Referenced by orb_status_helper::get_orb_color(), image::getMinimap(), gui2::dialogs::select_orb_colors::pre_show(), and image::render_minimap().
bool preferences::allow_observers | ( | ) |
Definition at line 451 of file game.cpp.
References get().
Referenced by ng::configure_engine::allow_observers_default().
bool preferences::animate_map | ( | ) |
Definition at line 825 of file general.cpp.
References get().
Referenced by hotkey::command_executor::execute_command_wrap(), gui2::dialogs::preferences_dialog::initialize_callbacks(), and display::invalidate_animations().
bool preferences::animate_water | ( | ) |
Definition at line 830 of file general.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), terrain_builder::tile::rebuild_cache(), and display::update().
bool preferences::ask_delete_saves | ( | ) |
Definition at line 776 of file game.cpp.
References get().
Referenced by gui2::dialogs::game_load::delete_button_callback(), and gui2::dialogs::get_dont_ask_again().
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().
bool preferences::auto_pixel_scale | ( | ) |
Definition at line 419 of file general.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and video::update_framebuffer().
int preferences::autosavemax | ( | ) |
Definition at line 791 of file game.cpp.
References get().
Referenced by playsingle_controller::before_human_turn(), savegame::save_index_class::delete_old_auto_saves(), play_controller::do_autosave(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
int preferences::bell_volume | ( | ) |
Definition at line 635 of file general.cpp.
Referenced by sound::init_sound(), and set_bell_volume().
bool preferences::blindfold_replay | ( | ) |
Definition at line 591 of file game.cpp.
References get().
Referenced by gui2::dialogs::mp_lobby::pre_show().
const std::vector< game_config::server_info > & preferences::builtin_servers_list | ( | ) |
Definition at line 356 of file game.cpp.
References game_config::server_list.
Referenced by gui2::dialogs::title_screen::button_callback_multiplayer(), network_host(), and game_launcher::play_multiplayer().
std::string preferences::campaign_server | ( | ) |
Definition at line 402 of file game.cpp.
References get().
Referenced by ad_hoc_addon_fetch_session(), addons_client::delete_remote_addon(), manage_addons(), and gui2::dialogs::addon_manager::publish_addon().
int preferences::chat_lines | ( | ) |
Definition at line 886 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and display_chat_manager::prune_chat_messages().
int preferences::chat_message_aging | ( | ) |
Definition at line 901 of file game.cpp.
References get().
Referenced by display_chat_manager::prune_chat_messages().
bool preferences::chat_timestamping | ( | ) |
Definition at line 876 of file game.cpp.
References get().
Referenced by get_chat_timestamp(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::clear | ( | const std::string & | key | ) |
Definition at line 190 of file general.cpp.
Referenced by game_lua_kernel::intf_toggle_fog(), set_mp_server_program_name(), and preprocessor_scope_helper::~preprocessor_scope_helper().
void preferences::clear_hotkeys | ( | ) |
Definition at line 935 of file general.cpp.
References hotkey::reset_default_hotkeys().
bool preferences::confirm_load_save_from_different_version | ( | ) |
Definition at line 969 of file general.cpp.
References get().
Referenced by savegame::loadgame::check_version_compatibility().
bool preferences::confirm_no_moves | ( | ) |
Definition at line 958 of file game.cpp.
References get().
Referenced by events::menu_handler::end_turn().
std::string preferences::core_id | ( | ) |
Definition at line 332 of file general.cpp.
References get().
Referenced by gui2::dialogs::title_screen::button_callback_cores(), game_config_manager::load_addons_cfg(), game_config_manager::load_game_config(), and set_core_id().
bool preferences::countdown | ( | ) |
Definition at line 601 of file game.cpp.
References get().
Referenced by savegame::save_index_class::delete_old_auto_saves(), and ng::configure_engine::mp_countdown_default().
int preferences::countdown_action_bonus | ( | ) |
Definition at line 641 of file game.cpp.
References get().
Referenced by ng::configure_engine::mp_countdown_action_bonus_default(), and gui2::dialogs::mp_create_game::reset_timer_settings().
int preferences::countdown_init_time | ( | ) |
Definition at line 611 of file game.cpp.
References get().
Referenced by ng::configure_engine::mp_countdown_init_time_default(), and gui2::dialogs::mp_create_game::reset_timer_settings().
int preferences::countdown_reservoir_time | ( | ) |
Definition at line 621 of file game.cpp.
References get().
Referenced by ng::configure_engine::mp_countdown_reservoir_time_default(), and gui2::dialogs::mp_create_game::reset_timer_settings().
int preferences::countdown_turn_bonus | ( | ) |
Definition at line 631 of file game.cpp.
References get().
Referenced by ng::configure_engine::mp_countdown_turn_bonus_default(), and gui2::dialogs::mp_create_game::reset_timer_settings().
std::string preferences::custom_command | ( | ) |
Definition at line 926 of file game.cpp.
References get().
Referenced by events::menu_handler::custom_command().
bool preferences::damage_prediction_allow_monte_carlo_simulation | ( | ) |
bool preferences::delete_saves | ( | ) |
Definition at line 766 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and campaign_controller::play_game().
bool preferences::disable_auto_moves | ( | ) |
Definition at line 979 of file general.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), playsingle_controller::play_human_turn(), and playmp_controller::play_human_turn().
void preferences::disable_preferences_save | ( | ) |
Definition at line 231 of file general.cpp.
Referenced by game_launcher::game_launcher().
int preferences::draw_delay | ( | ) |
Definition at line 905 of file general.cpp.
Referenced by gui2::dialogs::story_viewer::draw_floating_image(), draw_manager::get_frame_length(), gui2::dialogs::preferences_dialog::initialize_callbacks(), and display::update_fps_count().
bool preferences::ellipses | ( | ) |
Definition at line 555 of file general.cpp.
References get().
Referenced by events::menu_handler::toggle_ellipses().
void preferences::enable_mouse_scroll | ( | bool | value | ) |
Definition at line 815 of file general.cpp.
References set().
Referenced by hotkey::command_executor::execute_command_wrap().
bool preferences::enable_whiteboard_mode_on_start | ( | ) |
Definition at line 426 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and wb::manager::on_init_side().
void preferences::encounter_all_content | ( | const game_board & | gameboard_ | ) |
Definition at line 1000 of file game.cpp.
References encounter_map_terrain(), encounter_recallable_units(), encounter_recruitable_units(), encounter_start_units(), game_board::map(), game_board::teams(), and game_board::units().
Referenced by play_controller::init().
void preferences::encounter_map_terrain | ( | const gamemap & | map | ) |
Definition at line 989 of file game.cpp.
References encountered_terrains(), gamemap_base::for_each_loc(), gamemap_base::get_terrain(), t, and gamemap::underlying_union_terrain().
Referenced by encounter_all_content().
|
static |
void preferences::encounter_recallable_units | ( | std::vector< team > & | teams | ) |
void preferences::encounter_recruitable_units | ( | const std::vector< team > & | teams | ) |
Definition at line 965 of file game.cpp.
Referenced by encounter_all_content().
void preferences::encounter_start_units | ( | const unit_map & | units | ) |
Definition at line 973 of file game.cpp.
Referenced by encounter_all_content().
std::set< t_translation::terrain_code > & preferences::encountered_terrains | ( | ) |
Definition at line 921 of file game.cpp.
Referenced by game_board::change_terrain(), encounter_map_terrain(), help::generate_terrain_sections(), gui2::get_mp_tooltip(), help::unit_topic_generator::operator()(), help::show_with_toplevel(), and unit_moves().
std::set< std::string > & preferences::encountered_units | ( | ) |
Definition at line 916 of file game.cpp.
Referenced by unit_creator::add_unit(), advance_unit(), unit::apply_builtin_effect(), help::description_type(), events::console_handler::do_discover(), events::console_handler::do_undiscover(), intf_add_known_unit(), actions::place_recruit(), unit_creator::post_create(), gui2::dialogs::faction_select::profile_button_callback(), help::show_with_toplevel(), and gui2::tip_of_the_day::shuffle().
std::string preferences::enemy_color | ( | ) |
Definition at line 342 of file general.cpp.
References game_config::colors::enemy_orb_color, fix_orb_color_name(), and get().
Referenced by orb_status_helper::get_orb_color(), image::getMinimap(), gui2::dialogs::select_orb_colors::pre_show(), and image::render_minimap().
std::string preferences::era | ( | ) |
Definition at line 681 of file game.cpp.
References get().
Referenced by ai::configuration::add_era_ai_from_config(), ng::depcheck::manager::change_era(), ng::depcheck::manager::change_era_dialog(), ng::depcheck::manager::change_modifications(), ng::connect_engine::connect_engine(), savegame::loadgame::copy_era(), help::generate_era_sections(), help::generate_era_topics(), help::generate_faction_topics(), mp::initial_level_config(), game_config_manager::load_game_config_for_game(), gui2::dialogs::mp_create_game::pre_show(), and gui2::dialogs::mp_join_game::show_flg_select().
void preferences::erase | ( | const std::string & | key | ) |
Definition at line 205 of file general.cpp.
Referenced by carryover::get_recruits(), campaignd::server::handle_delete(), load_game_prefs(), gui2::dialogs::mp_create_game::reset_timer_settings(), and ai::simulated_attack().
|
static |
Definition at line 311 of file general.cpp.
Referenced by allied_color(), enemy_color(), moved_color(), partial_color(), and unmoved_color().
bool preferences::fog | ( | ) |
Definition at line 525 of file game.cpp.
References get().
Referenced by ng::configure_engine::fog_game_default(), game_lua_kernel::intf_get_fog_or_shroud(), gui2::dialogs::mp_create_game::pre_show(), and team::set_fog().
int preferences::font_scaled | ( | int | size | ) |
Definition at line 500 of file general.cpp.
References font_scaling(), and utf8::size().
Referenced by help::help_text_area::add_text_item(), and font::pango_text::set_font_size().
int preferences::font_scaling | ( | ) |
Definition at line 489 of file general.cpp.
References max_font_scaling, and min_font_scaling.
Referenced by font_scaled().
bool preferences::fullscreen | ( | ) |
Definition at line 434 of file general.cpp.
References get().
Referenced by preferences::prefs_event_handler::handle_window_event(), video::init_window(), gui2::dialogs::preferences_dialog::initialize_callbacks(), maximized(), video::set_fullscreen(), and video::toggle_fullscreen().
std::string preferences::get | ( | const std::string & | key | ) |
Definition at line 213 of file general.cpp.
Referenced by addon_manager_saved_order_direction(), addon_manager_saved_order_name(), allied_color(), allow_observers(), animate_map(), animate_water(), ask_delete_saves(), auto_open_whisper_windows(), auto_pixel_scale(), preferences::editor::auto_update_transitions(), autosavemax(), blindfold_replay(), campaign_server(), chat_lines(), chat_message_aging(), chat_timestamping(), confirm_load_save_from_different_version(), confirm_no_moves(), core_id(), countdown(), countdown_action_bonus(), countdown_init_time(), countdown_reservoir_time(), countdown_turn_bonus(), custom_command(), damage_prediction_allow_monte_carlo_simulation(), preferences::editor::default_dir(), delete_saves(), deprecated_message(), disable_auto_moves(), preferences::editor::draw_hex_coordinates(), preferences::editor::draw_num_of_bitmaps(), preferences::editor::draw_terrain_codes(), ellipses(), enable_whiteboard_mode_on_start(), enemy_color(), era(), fi_blocked_in_game(), fi_friends_in_game(), fi_invert(), fi_vacant_slots(), fog(), fullscreen(), game_config_manager::game_config_manager(), get_lobby_joins(), get_mp_server_program_name(), green_confirm(), grid(), controller_base::handle_scroll(), hide_whiteboard(), idle_anim(), interrupt_when_ally_sighted(), level(), level_type(), load_game_prefs(), login(), maximized(), message_bell(), middle_click_scrolls(), minimap_draw_terrain(), minimap_draw_units(), minimap_draw_villages(), minimap_movement_coding(), minimap_terrain_coding(), mouse_scroll_enabled(), moved_color(), mp_server_warning_disabled(), music_on(), network_host(), partial_color(), random_faction_mode(), random_start_time(), remember_password(), save_compression_format(), save_replays(), save_sound_buffer_size(), scroll_speed(), scroll_to_action(), selected_achievement_group(), gui2::dialogs::setup_pref_toggle_button(), show_all_units_in_help(), show_ally_orb(), show_combat(), show_disengaged_orb(), show_enemy_orb(), show_floating_labels(), show_moved_orb(), show_partial_orb(), show_side_colors(), show_standing_animations(), show_status_on_ally_orb(), show_unmoved_orb(), shroud(), shuffle_sides(), skip_ai_moves(), skip_mp_replay(), sound_on(), stop_music_in_background(), theme(), turbo(), turn_bell(), turn_dialog(), turns(), UI_sound_on(), unmoved_color(), use_color_cursors(), use_map_settings(), use_twelve_hour_clock_format(), village_gold(), village_support(), vsync(), whisper_friends_only(), xp_modifier(), and yellow_confirm().
bool preferences::get | ( | const std::string & | key, |
bool | def | ||
) |
Definition at line 221 of file general.cpp.
std::string preferences::get | ( | const std::string & | key, |
const std::string & | def | ||
) |
Definition at line 217 of file general.cpp.
const std::map< std::string, acquaintance > & preferences::get_acquaintances | ( | ) |
Definition at line 192 of file game.cpp.
References load_acquaintances().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), gui2::dialogs::preferences_dialog::on_friends_list_select(), and gui2::dialogs::preferences_dialog::remove_friend_list_entry().
std::map< std::string, std::string > preferences::get_acquaintances_nice | ( | const std::string & | filter | ) |
Definition at line 213 of file game.cpp.
References a, and load_acquaintances().
Referenced by play_controller::tab().
const advanced_pref_list & preferences::get_advanced_preferences | ( | ) |
Gets a list of the available advanced preferences.
Definition at line 87 of file advanced.cpp.
References singleton.
Referenced by impl_preferences_dir().
optional_const_config preferences::get_alias | ( | ) |
Definition at line 948 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 226 of file general.cpp.
Referenced by impl_preferences_get().
std::string preferences::get_chat_timestamp | ( | const std::time_t & | t | ) |
Definition at line 863 of file game.cpp.
References _(), chat_timestamping(), lg::get_timestamp(), t, and use_twelve_hour_clock_format().
Referenced by display_chat_manager::add_chat_message(), gui2::chatbox::append_to_chatbox(), and gui2::dialogs::chat_log::model::stream_log().
optional_const_config preferences::get_child | ( | const std::string & | key | ) |
Definition at line 200 of file general.cpp.
Referenced by get_alias(), load_game_prefs(), vconfig::all_children_iterator::operator*(), vconfig::all_children_iterator::operator->(), and options().
std::vector< std::string > * preferences::get_history | ( | const std::string & | id | ) |
const std::string preferences::get_ignored_delim | ( | ) |
Definition at line 198 of file game.cpp.
References utils::join(), and load_acquaintances().
Referenced by ng::connect_engine::send_level_data().
lobby_joins preferences::get_lobby_joins | ( | ) |
Definition at line 331 of file game.cpp.
References get(), show_all, show_friends, and show_none.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and parse_should_show_lobby_join().
std::string preferences::get_mp_server_program_name | ( | ) |
Definition at line 510 of file game.cpp.
References get().
Referenced by show_wesnothd_server_search(), and game_launcher::start_wesnothd().
config * preferences::get_prefs | ( | ) |
Definition at line 235 of file general.cpp.
Referenced by impl_preferences_dir(), load_acquaintances(), save_acquaintances(), set_user_servers_list(), and user_servers_list().
bool preferences::green_confirm | ( | ) |
Definition at line 947 of file game.cpp.
References get().
Referenced by events::menu_handler::end_turn().
bool preferences::grid | ( | ) |
Definition at line 565 of file general.cpp.
References get().
Referenced by add_widget(), BOOST_AUTO_TEST_CASE(), display::draw_hex(), editor::editor_controller::get_action_state(), gui2::dialogs::preferences_dialog::initialize_callbacks(), test_grid(), events::menu_handler::toggle_grid(), and editor::editor_controller::toggle_grid().
std::string preferences::gui_theme | ( | ) |
Definition at line 545 of file general.cpp.
Referenced by gui2::init().
bool preferences::have_setting | ( | const std::string & | key | ) |
Definition at line 209 of file general.cpp.
bool preferences::hide_whiteboard | ( | ) |
Definition at line 436 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and wb::manager::manager().
bool preferences::idle_anim | ( | ) |
Definition at line 515 of file general.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), unit_animation_component::refresh(), and unit_animation_component::start_animation().
double preferences::idle_anim_rate | ( | ) |
Definition at line 525 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), unit_animation_component::refresh(), and unit_animation_component::start_animation().
void preferences::init_advanced_manager | ( | const game_config_view & | gc | ) |
Initializes the manager singleton.
Definition at line 82 of file advanced.cpp.
References singleton.
Referenced by game_config_manager::init_game_config().
bool preferences::interrupt_when_ally_sighted | ( | ) |
Definition at line 786 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and actions::move_unit_and_record().
bool preferences::is_campaign_completed | ( | const std::string & | campaign_id | ) |
Definition at line 293 of file game.cpp.
Referenced by gui2::dialogs::campaign_selection::campaign_selected(), ng::campaign::mark_if_completed(), and gui2::dialogs::campaign_difficulty::pre_show().
bool preferences::is_campaign_completed | ( | const std::string & | campaign_id, |
const std::string & | difficulty_level | ||
) |
bool preferences::is_friend | ( | const std::string & | nick | ) |
Definition at line 264 of file game.cpp.
References load_acquaintances().
Referenced by display_chat_manager::add_chat_message(), gui2::chatbox::add_chat_room_message_received(), gui2::dialogs::preferences_dialog::add_friend_list_entry(), gui2::chatbox::add_whisper_received(), mp::user_info::get_relation(), and parse_should_show_lobby_join().
bool preferences::is_ignored | ( | const std::string & | nick | ) |
Definition at line 276 of file game.cpp.
References load_acquaintances().
Referenced by replay::add_chat_log_entry(), display_chat_manager::add_chat_message(), mp::user_info::get_relation(), game_state::init(), and gui2::chatbox::process_message().
int preferences::keepalive_timeout | ( | ) |
Definition at line 505 of file general.cpp.
Referenced by wesnothd_connection::handshake().
void preferences::keepalive_timeout | ( | int | seconds | ) |
Definition at line 510 of file general.cpp.
std::string preferences::language | ( | ) |
Definition at line 535 of file general.cpp.
Referenced by get_locale(), and translation::set_language().
std::string preferences::level | ( | ) |
Definition at line 691 of file game.cpp.
References get().
Referenced by gui2::dialogs::mp_create_game::pre_show().
|
static |
Definition at line 171 of file game.cpp.
References preferences::acquaintance::get_nick(), and get_prefs().
Referenced by get_acquaintances(), get_acquaintances_nice(), get_ignored_delim(), is_friend(), and is_ignored().
void preferences::load_base_prefs | ( | ) |
Definition at line 240 of file general.cpp.
References e, ERR_CFG, filesystem::get_default_prefs_file(), filesystem::get_prefs_file(), filesystem::istream_file(), and read().
Referenced by preferences::base_manager::base_manager(), and gui2::dialogs::migrate_version_selection::post_show().
void preferences::load_credentials | ( | ) |
Definition at line 203 of file credentials.cpp.
References aes_decrypt(), schema_validation::at(), build_key(), clear_credentials(), CREDENTIAL_SEPARATOR, credentials, data, ERR_CFG, filesystem::file_exists(), filesystem::get_credentials_file(), get_system_username(), filesystem::istream_file(), remember_password(), utils::REMOVE_EMPTY, utils::split(), and unescape().
Referenced by preferences::base_manager::base_manager(), gui2::dialogs::migrate_version_selection::post_show(), and set_remember_password().
void preferences::load_game_prefs | ( | ) |
Definition at line 120 of file game.cpp.
References c, config::child_range(), d, erase(), get(), get_child(), h, music_volume(), t_translation::read_list(), set_music_volume(), set_sound_volume(), sound_volume(), utils::split(), and utils::split_set().
Referenced by preferences::manager::manager(), and gui2::dialogs::migrate_version_selection::post_show().
void preferences::load_hotkeys | ( | ) |
Definition at line 925 of file general.cpp.
References hotkey::load_custom_hotkeys(), and game_config_view::wrap().
Referenced by game_config_manager::init_game_config().
std::string preferences::login | ( | ) |
Definition at line 117 of file credentials.cpp.
References EMPTY_LOGIN, ERR_CFG, get(), and get_system_username().
Referenced by events::menu_handler::add_chat_message(), display_chat_manager::add_chat_message(), gui2::chatbox::add_chat_room_message_received(), events::chat_handler::add_chat_room_message_sent(), gui2::chatbox::add_chat_room_message_sent(), gui2::chatbox::add_whisper_sent(), build_key(), gui2::chatbox::chat_input_keypress_callback(), events::console_handler::do_droid(), gui2::dialogs::mp_join_game::fetch_game_config(), ng::configure_engine::game_name_default(), gui2::dialogs::mp_join_game::generate_side_list(), mp::user_info::get_relation(), get_system_username(), wesnothd::server::is_login_allowed(), wesnothd::server::login_client(), gui2::dialogs::mp_login::mp_login(), ng::side_engine::new_config(), password(), gui2::player_list_helper::player_list_helper(), gui2::dialogs::mp_join_game::post_show(), gui2::dialogs::mp_change_control::pre_show(), gui2::dialogs::mp_login::pre_show(), gui2::dialogs::mp_method_selection::pre_show(), ng::side_engine::ready_for_start(), events::menu_handler::request_control_change(), gui2::chatbox::send_chat_message(), events::menu_handler::send_chat_message(), events::chat_handler::send_chat_room_message(), events::chat_handler::send_whisper(), set_login(), set_password(), gui2::dialogs::mp_join_game::show_flg_select(), play_controller::tab(), and gui2::player_list_helper::update_list().
bool preferences::maximized | ( | ) |
Definition at line 429 of file general.cpp.
References fullscreen(), and get().
Referenced by video::init_window(), and video::set_fullscreen().
bool preferences::message_bell | ( | ) |
Definition at line 723 of file general.cpp.
References get().
Referenced by do_replay_handle(), and turn_info::process_network_data().
bool preferences::message_private | ( | ) |
Definition at line 833 of file game.cpp.
Referenced by events::menu_handler::speak().
bool preferences::middle_click_scrolls | ( | ) |
Definition at line 805 of file general.cpp.
References get().
Referenced by controller_base::handle_scroll(), and events::mouse_handler_base::mouse_press().
bool preferences::minimap_draw_terrain | ( | ) |
Definition at line 875 of file general.cpp.
References get().
Referenced by editor::editor_controller::get_action_state(), play_controller::hotkey_handler::get_action_state(), image::getMinimap(), image::render_minimap(), and toggle_minimap_draw_terrain().
bool preferences::minimap_draw_units | ( | ) |
Definition at line 855 of file general.cpp.
References get().
Referenced by display::draw_minimap_units(), editor::editor_controller::get_action_state(), play_controller::hotkey_handler::get_action_state(), image::render_minimap(), and toggle_minimap_draw_units().
bool preferences::minimap_draw_villages | ( | ) |
Definition at line 865 of file general.cpp.
References get().
Referenced by editor::editor_controller::get_action_state(), play_controller::hotkey_handler::get_action_state(), image::getMinimap(), image::render_minimap(), and toggle_minimap_draw_villages().
bool preferences::minimap_movement_coding | ( | ) |
Definition at line 835 of file general.cpp.
References get().
Referenced by display::draw_minimap_units(), editor::editor_controller::get_action_state(), play_controller::hotkey_handler::get_action_state(), image::getMinimap(), image::render_minimap(), and toggle_minimap_movement_coding().
bool preferences::minimap_terrain_coding | ( | ) |
Definition at line 845 of file general.cpp.
References get().
Referenced by editor::editor_controller::get_action_state(), play_controller::hotkey_handler::get_action_state(), image::getMinimap(), image::render_minimap(), and toggle_minimap_terrain_coding().
const std::vector< std::string > & preferences::modifications | ( | bool | mp | ) |
Definition at line 711 of file game.cpp.
Referenced by ng::depcheck::manager::change_modifications(), savegame::convert_old_saves_1_13_1(), ng::create_engine::create_engine(), image::locator::value::operator<(), image::locator::value::operator==(), gui2::dialogs::mp_create_game::pre_show(), and gui2::dialogs::mp_match_history::update_display().
bool preferences::mouse_scroll_enabled | ( | ) |
Definition at line 810 of file general.cpp.
References get().
Referenced by hotkey::command_executor::execute_command_wrap(), 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 820 of file general.cpp.
Referenced by controller_base::handle_scroll(), and preferences::base_manager::~base_manager().
std::string preferences::moved_color | ( | ) |
Definition at line 352 of file general.cpp.
References fix_orb_color_name(), get(), and game_config::colors::moved_orb_color.
Referenced by orb_status_helper::get_orb_color(), and gui2::dialogs::select_orb_colors::pre_show().
int preferences::mp_server_warning_disabled | ( | ) |
Definition at line 491 of file game.cpp.
References get().
Referenced by gui2::dialogs::title_screen::button_callback_multiplayer(), and gui2::dialogs::get_do_not_show_again().
bool preferences::music_on | ( | ) |
Definition at line 751 of file general.cpp.
References get().
Referenced by hotkey::command_executor::execute_command_wrap(), game_launcher::game_launcher(), sound::music_muter::handle_window_event(), sound::play_new_music(), sound::music_thinker::process(), sound::reset_sound(), set_music(), set_sound(), set_turn_bell(), and set_UI_sound().
int preferences::music_volume | ( | ) |
Definition at line 605 of file general.cpp.
Referenced by impl_music_get(), impl_music_set(), sound::init_sound(), load_game_prefs(), and set_music_volume().
std::string preferences::network_host | ( | ) |
Definition at line 387 of file game.cpp.
References builtin_servers_list(), and get().
Referenced by game_launcher::game_launcher(), and game_launcher::play_multiplayer().
const config & preferences::options | ( | ) |
Definition at line 555 of file game.cpp.
References config::clear(), and get_child().
Referenced by display::announce(), unit_animation_component::choose_animation(), campaignd::command_line::command_line(), commandline_options::commandline_options(), gui2::dialogs::mp_options_helper::display_custom_options(), events::console_handler::do_choose_level(), addons_client::do_resolve_addon_dependencies(), ai::ai_default_rca::combat_phase::evaluate(), gui2::dialogs::sp_options_configure::execute(), saved_game::expand_mp_options(), gui2::dialogs::mp_options_helper::get_options_config(), ai::helper_advance_unit(), gui2::dialogs::title_screen::hotkey_callback_select_tests(), game_lua_kernel::intf_set_floating_label(), gui2::dialogs::mp_options_helper::mp_options_helper(), ng::configure_engine::options_default(), wb::manager::options_dlg(), gui2::dialogs::wml_message_base::pre_show(), turn_info::process_network_data(), gui2::dialogs::preferences_dialog::set_resolution_list(), gui2::dialogs::game_load::set_save_dir_list(), lua_gui2::show_message_dialog(), and gui2::dialogs::show_wml_message().
bool preferences::parse_should_show_lobby_join | ( | const std::string & | sender, |
const std::string & | message | ||
) |
Definition at line 304 of file game.cpp.
References get_lobby_joins(), is_friend(), show_all, and show_none.
Referenced by replay::add_chat_log_entry(), display_chat_manager::add_chat_message(), and gui2::chatbox::process_message().
std::string preferences::partial_color | ( | ) |
Definition at line 372 of file general.cpp.
References fix_orb_color_name(), get(), and game_config::colors::partial_orb_color.
Referenced by orb_status_helper::get_orb_color(), and gui2::dialogs::select_orb_colors::pre_show().
std::string preferences::password | ( | const std::string & | server, |
const std::string & | login | ||
) |
Definition at line 157 of file credentials.cpp.
References aes_decrypt(), build_key(), credentials, DBG_CFG, login_info::key, login(), remember_password(), and utils::trim().
Referenced by wesnothd::server::authenticate(), addons_client::delete_remote_addon(), gui2::dialogs::mp_lobby::enter_game(), wesnothd::server::handle_join_game(), server_base::hash_password(), utils::bcrypt::hash_pw(), gui2::dialogs::mp_login::load_password(), utils::md5::md5(), gui2::dialogs::mp_join_game_password_prompt::mp_join_game_password_prompt(), gui2::dialogs::mp_create_game::post_show(), and gui2::dialogs::addon_manager::publish_addon().
int preferences::pixel_scale | ( | ) |
Definition at line 408 of file general.cpp.
References max_pixel_scale, and min_pixel_scale.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), draw::tiled_highres(), and video::update_framebuffer().
int preferences::progress_achievement | ( | const std::string & | content_for, |
const std::string & | id, | ||
int | limit = 999999 , |
||
int | max_progress = 999999 , |
||
int | amount = 0 |
||
) |
Increments the achievement's current progress by amount if it hasn't already been completed.
If you only want to check the achievement's current progress, then omit the last three arguments. amount defaults to 0, which will result in the current progress value being returned without being changed (x + 0 == x).
Note that this uses the same [in_progress] as is used for set_sub_achievement().
content_for | The id of the achievement group this achievement is in. |
id | The id for the specific achievement in the achievement group. |
limit | The maximum value that a specific call to this function can increase the achievement progress value. |
max_progress | The value when the achievement is considered completed. |
amount | The amount to progress the achievement. |
Definition at line 1071 of file general.cpp.
References achievement(), config::add_child(), config::child_range(), and id.
Referenced by achievement_group::achievement_group(), and game_lua_kernel::intf_progress_achievement().
std::string preferences::random_faction_mode | ( | ) |
Definition at line 471 of file game.cpp.
References get().
Referenced by ng::configure_engine::random_faction_mode_default().
bool preferences::random_start_time | ( | ) |
Definition at line 515 of file game.cpp.
References get().
Referenced by gui2::dialogs::editor_edit_scenario::editor_edit_scenario(), tod_manager::is_start_ToD(), and ng::configure_engine::random_start_time_default().
bool preferences::remember_password | ( | ) |
Definition at line 141 of file credentials.cpp.
References get().
Referenced by gui2::dialogs::addon_auth::addon_auth(), gui2::dialogs::preferences_dialog::initialize_callbacks(), load_credentials(), gui2::dialogs::mp_login::mp_login(), password(), save_credentials(), and set_password().
bool preferences::remove_acquaintance | ( | const std::string & | nick | ) |
Definition at line 241 of file game.cpp.
References i, and save_acquaintances().
Referenced by events::chat_command_handler::do_remove(), gui2::dialogs::preferences_dialog::remove_friend_list_entry(), and gui2::dialogs::lobby_player_info::remove_from_list_button_callback().
point preferences::resolution | ( | ) |
Definition at line 392 of file general.cpp.
References def_window_height, def_window_width, min_window_height, min_window_width, and draw::point().
Referenced by expand_partialresolution(), get_resolution(), video::init_window(), gui2::styled_widget_definition::load_resolutions(), and video::set_resolution().
unsigned int preferences::sample_rate | ( | ) |
Definition at line 953 of file general.cpp.
Referenced by sound::init_sound(), and save_sample_rate().
|
static |
Definition at line 181 of file game.cpp.
References a, config::add_child(), config::clear_children(), and get_prefs().
Referenced by add_acquaintance(), and remove_acquaintance().
compression::format preferences::save_compression_format | ( | ) |
Definition at line 843 of file game.cpp.
References compression::bzip2, get(), compression::gzip, and compression::none.
Referenced by playsingle_controller::before_human_turn(), play_controller::do_autosave(), play_controller::do_consolesave(), play_controller::hotkey_handler::expand_autosaves(), playmp_controller::linger(), campaign_controller::play_game(), playsingle_controller::play_scenario(), play_controller::save_game(), play_controller::save_game_auto(), play_controller::save_replay(), play_controller::save_replay_auto(), and savegame::save_index_class::write_save_index().
void preferences::save_credentials | ( | ) |
Definition at line 231 of file credentials.cpp.
References aes_encrypt(), build_key(), CREDENTIAL_SEPARATOR, credentials, filesystem::delete_file(), ERR_CFG, escape(), filesystem::get_credentials_file(), get_system_username(), filesystem::ostream_file(), and remember_password().
Referenced by write_preferences().
void preferences::save_hotkeys | ( | ) |
Definition at line 930 of file general.cpp.
References hotkey::save_hotkeys().
bool preferences::save_replays | ( | ) |
Definition at line 756 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and campaign_controller::play_game().
void preferences::save_sample_rate | ( | const unsigned int | rate | ) |
Definition at line 958 of file general.cpp.
References sound::reset_sound(), and sample_rate().
void preferences::save_sound_buffer_size | ( | const std::size_t | size | ) |
Definition at line 588 of file general.cpp.
References get(), sound::reset_sound(), set(), and utf8::size().
int preferences::scroll_speed | ( | ) |
Definition at line 791 of file general.cpp.
References get().
Referenced by controller_base::handle_scroll(), gui2::dialogs::preferences_dialog::initialize_callbacks(), events::mouse_handler_base::mouse_wheel(), and display::scroll_to_xy().
bool preferences::scroll_to_action | ( | ) |
Definition at line 382 of file general.cpp.
References get().
Referenced by display::scroll_to_xy().
std::string preferences::selected_achievement_group | ( | ) |
Definition at line 1019 of file general.cpp.
References get().
void preferences::set | ( | const std::string & | key, |
bool | value | ||
) |
Definition at line 165 of file general.cpp.
Referenced by _set_color_cursors(), _set_lobby_joins(), _set_resolution(), enable_mouse_scroll(), game_config_manager::game_config_manager(), impl_preferences_set(), save_sound_buffer_size(), set_addon_manager_saved_order_direction(), set_addon_manager_saved_order_name(), 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(), 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_blocked_in_game(), set_fi_friends_in_game(), set_fi_invert(), set_fi_vacant_slots(), set_fog(), set_grid(), 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_remember_password(), set_save_replays(), set_selected_achievement_group(), set_show_all_units_in_help(), set_show_floating_labels(), 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(), and preferences::manager::~manager().
void preferences::set | ( | const std::string & | key, |
char const * | value | ||
) |
Definition at line 175 of file general.cpp.
void preferences::set | ( | const std::string & | key, |
const config::attribute_value & | value | ||
) |
Definition at line 185 of file general.cpp.
void preferences::set | ( | const std::string & | key, |
const std::string & | value | ||
) |
Definition at line 180 of file general.cpp.
void preferences::set | ( | const std::string & | key, |
int | value | ||
) |
Definition at line 170 of file general.cpp.
void preferences::set_achievement | ( | const std::string & | content_for, |
const std::string & | id | ||
) |
Marks the specified achievement as completed.
content_for | The achievement group the achievement is part of. |
id | The ID of the achievement within the achievement group. |
Definition at line 1042 of file general.cpp.
References id, and utils::split().
Referenced by game_lua_kernel::intf_set_achievement().
void preferences::set_addon_manager_saved_order_direction | ( | sort_order::type | value | ) |
Definition at line 1014 of file general.cpp.
References string_enums::enum_base< Definition >::get_string(), and set().
Referenced by gui2::dialogs::addon_manager::on_order_changed(), and gui2::dialogs::addon_manager::order_addons().
void preferences::set_addon_manager_saved_order_name | ( | const std::string & | value | ) |
Definition at line 1004 of file general.cpp.
References set().
Referenced by gui2::dialogs::addon_manager::on_order_changed(), and gui2::dialogs::addon_manager::order_addons().
void preferences::set_allied_color | ( | const std::string & | color_id | ) |
Definition at line 328 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_allow_observers | ( | bool | value | ) |
void preferences::set_animate_map | ( | bool | value | ) |
Definition at line 885 of file general.cpp.
References set().
Referenced by hotkey::command_executor::execute_command_wrap(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_animate_water | ( | bool | value | ) |
Definition at line 890 of file general.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_ask_delete_saves | ( | bool | value | ) |
Definition at line 771 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_auto_pixel_scale | ( | bool | choice | ) |
Definition at line 424 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::apply_pixel_scale(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_autosavemax | ( | int | value | ) |
Definition at line 796 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_bell_volume | ( | int | vol | ) |
Definition at line 640 of file general.cpp.
References bell_volume(), and sound::set_bell_volume().
void preferences::set_blindfold_replay | ( | bool | value | ) |
Definition at line 596 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 | ) |
void preferences::set_chat_lines | ( | int | lines | ) |
Definition at line 891 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_chat_message_aging | ( | const int | aging | ) |
void preferences::set_chat_timestamping | ( | bool | value | ) |
Definition at line 881 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_child | ( | const std::string & | key, |
const config & | val | ||
) |
Definition at line 195 of file general.cpp.
Referenced by set_options(), and preferences::manager::~manager().
void preferences::set_color_cursors | ( | bool | value | ) |
Definition at line 44 of file display.cpp.
References _set_color_cursors(), and cursor::set().
void preferences::set_core_id | ( | const std::string & | core_id | ) |
Definition at line 338 of file general.cpp.
References core_id().
Referenced by gui2::dialogs::title_screen::button_callback_cores(), game_launcher::game_launcher(), and game_config_manager::load_game_config().
void preferences::set_countdown | ( | bool | value | ) |
void preferences::set_countdown_action_bonus | ( | int | value | ) |
void preferences::set_countdown_init_time | ( | int | value | ) |
void preferences::set_countdown_reservoir_time | ( | int | value | ) |
void preferences::set_countdown_turn_bonus | ( | int | value | ) |
void preferences::set_custom_command | ( | const std::string & | command | ) |
Definition at line 931 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 994 of file general.cpp.
References set().
void preferences::set_delete_saves | ( | bool | value | ) |
Definition at line 761 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_disable_auto_moves | ( | bool | value | ) |
Definition at line 984 of file general.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_draw_delay | ( | int | value | ) |
Definition at line 910 of file general.cpp.
Referenced by game_launcher::game_launcher(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_ellipses | ( | bool | ison | ) |
Definition at line 560 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 431 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_enemy_color | ( | const std::string & | color_id | ) |
Definition at line 348 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_era | ( | const std::string & | value | ) |
Definition at line 686 of file game.cpp.
References set().
Referenced by gui2::dialogs::mp_create_game::post_show().
void preferences::set_fi_blocked_in_game | ( | bool | value | ) |
void preferences::set_fi_friends_in_game | ( | bool | value | ) |
void preferences::set_fi_invert | ( | bool | value | ) |
void preferences::set_fi_vacant_slots | ( | bool | value | ) |
void preferences::set_font_scaling | ( | int | scale | ) |
Definition at line 495 of file general.cpp.
References max_font_scaling, min_font_scaling, and xbrz::scale().
void preferences::set_grid | ( | bool | ison | ) |
Definition at line 570 of file general.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), events::menu_handler::toggle_grid(), and editor::editor_controller::toggle_grid().
void preferences::set_gui_theme | ( | const std::string & | s | ) |
Definition at line 550 of file general.cpp.
void preferences::set_hide_whiteboard | ( | bool | value | ) |
Definition at line 441 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_idle_anim | ( | const bool | ison | ) |
Definition at line 520 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_idle_anim_rate | ( | const int | rate | ) |
Definition at line 530 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_interrupt_when_ally_sighted | ( | bool | value | ) |
Definition at line 781 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_language | ( | const std::string & | s | ) |
Definition at line 540 of file general.cpp.
Referenced by gui2::dialogs::language_selection::post_show().
void preferences::set_level | ( | const std::string & | value | ) |
Definition at line 696 of file game.cpp.
References set().
Referenced by game_launcher::game_launcher(), gui2::dialogs::mp_create_game::post_show(), and wesnoth_global_fixture::wesnoth_global_fixture().
void preferences::set_level_type | ( | int | value | ) |
Definition at line 706 of file game.cpp.
References set().
Referenced by gui2::dialogs::mp_create_game::post_show().
void preferences::set_login | ( | const std::string & | login | ) |
Definition at line 133 of file credentials.cpp.
References login(), set(), and utils::trim().
Referenced by game_launcher::game_launcher(), gui2::dialogs::mp_login::mp_login(), and gui2::dialogs::mp_method_selection::post_show().
void preferences::set_message_private | ( | bool | value | ) |
Definition at line 838 of file game.cpp.
Referenced by gui::floating_textbox::close(), events::menu_handler::shout(), mp::start_local_game(), mp::start_local_game_commandline(), and events::menu_handler::whisper().
void preferences::set_modifications | ( | const std::vector< std::string > & | value, |
bool | mp | ||
) |
Definition at line 720 of file game.cpp.
References utils::join(), and set().
Referenced by gui2::dialogs::campaign_selection::post_show(), and gui2::dialogs::mp_create_game::post_show().
void preferences::set_moved_color | ( | const std::string & | color_id | ) |
Definition at line 358 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 501 of file game.cpp.
References clear(), game_config::path, 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 496 of file game.cpp.
References set().
Referenced by gui2::dialogs::set_do_not_show_again().
bool preferences::set_music | ( | bool | ison | ) |
Definition at line 756 of file general.cpp.
References sound::close_sound(), sound::init_sound(), music_on(), sound::play_music(), set(), sound_on(), sound::stop_music(), turn_bell(), and UI_sound_on().
Referenced by hotkey::command_executor::execute_command_wrap(), and game_launcher::game_launcher().
void preferences::set_music_volume | ( | int | vol | ) |
Definition at line 610 of file general.cpp.
References music_volume(), and sound::set_music_volume().
Referenced by load_game_prefs().
void preferences::set_network_host | ( | const std::string & | host | ) |
Definition at line 397 of file game.cpp.
References set().
Referenced by game_launcher::play_multiplayer().
void preferences::set_options | ( | const config & | values | ) |
Definition at line 575 of file game.cpp.
References set_child().
Referenced by ng::configure_engine::set_options().
void preferences::set_partial_color | ( | const std::string & | color_id | ) |
Definition at line 378 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 | ||
) |
Definition at line 181 of file credentials.cpp.
References aes_encrypt(), build_key(), clear_credentials(), credentials, DBG_CFG, login_info::key, login(), remember_password(), and utils::trim().
Referenced by addons_client::delete_remote_addon(), game_launcher::game_launcher(), gui2::dialogs::addon_manager::publish_addon(), and gui2::dialogs::mp_login::save_password().
void preferences::set_pixel_scale | ( | const int | scale | ) |
Definition at line 414 of file general.cpp.
References max_pixel_scale, min_pixel_scale, and xbrz::scale().
Referenced by gui2::dialogs::preferences_dialog::apply_pixel_scale(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_random_faction_mode | ( | const std::string & | value | ) |
Definition at line 476 of file game.cpp.
References set().
Referenced by gui2::dialogs::mp_create_game::post_show().
void preferences::set_random_start_time | ( | bool | value | ) |
void preferences::set_remember_password | ( | bool | remember | ) |
Definition at line 146 of file credentials.cpp.
References clear_credentials(), load_credentials(), and set().
Referenced by gui2::dialogs::addon_auth::addon_auth(), gui2::dialogs::preferences_dialog::initialize_callbacks(), and gui2::dialogs::mp_login::mp_login().
void preferences::set_save_replays | ( | bool | value | ) |
Definition at line 751 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_scroll_speed | ( | const int | new_speed | ) |
Definition at line 799 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_scroll_to_action | ( | bool | ison | ) |
Definition at line 387 of file general.cpp.
void preferences::set_selected_achievement_group | ( | const std::string & | content_for | ) |
Definition at line 1024 of file general.cpp.
References set().
Referenced by gui2::dialogs::achievements_dialog::post_show().
void preferences::set_show_all_units_in_help | ( | bool | value | ) |
void preferences::set_show_ally_orb | ( | bool | show_orb | ) |
Definition at line 265 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_show_disengaged_orb | ( | bool | show_orb | ) |
Definition at line 307 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 279 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_show_floating_labels | ( | bool | value | ) |
Definition at line 828 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_show_fps | ( | bool | value | ) |
Definition at line 900 of file general.cpp.
Referenced by events::console_handler::do_fps(), and game_launcher::game_launcher().
void preferences::set_show_moved_orb | ( | bool | show_orb | ) |
Definition at line 286 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 300 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_show_side_colors | ( | bool | value | ) |
Definition at line 741 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_show_standing_animations | ( | bool | value | ) |
Definition at line 56 of file display.cpp.
References d, display::get_singleton(), and set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_show_status_on_ally_orb | ( | bool | show_orb | ) |
Definition at line 272 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_show_unmoved_orb | ( | bool | show_orb | ) |
Definition at line 293 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_shroud | ( | bool | value | ) |
void preferences::set_shuffle_sides | ( | bool | value | ) |
void preferences::set_skip_ai_moves | ( | bool | value | ) |
Definition at line 736 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_skip_mp_replay | ( | bool | value | ) |
Definition at line 586 of file game.cpp.
References set().
Referenced by gui2::dialogs::mp_lobby::skip_replay_changed_callback().
bool preferences::set_sound | ( | bool | ison | ) |
Definition at line 733 of file general.cpp.
References sound::close_sound(), sound::init_sound(), music_on(), set(), sound_on(), sound::stop_sound(), turn_bell(), and UI_sound_on().
Referenced by hotkey::command_executor::execute_command_wrap(), and game_launcher::game_launcher().
void preferences::set_sound_volume | ( | int | vol | ) |
Definition at line 625 of file general.cpp.
References sound::set_sound_volume(), and sound_volume().
Referenced by load_game_prefs().
void preferences::set_stop_music_in_background | ( | bool | ison | ) |
Definition at line 782 of file general.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_sub_achievement | ( | const std::string & | content_for, |
const std::string & | id, | ||
const std::string & | sub_id | ||
) |
Marks the specified sub-achievement as completed.
Note that this uses the same [in_progress] as is used for progress_achievement().
content_for | The achievement group the achievement is part of. |
id | The ID of the achievement within the achievement group. |
sub_id | The ID of the sub-achievement within the achievement. |
Definition at line 1158 of file general.cpp.
References achievement(), config::add_child(), config::child_range(), id, and utils::split().
Referenced by game_lua_kernel::intf_set_sub_achievement().
void preferences::set_theme | ( | const std::string & | theme | ) |
Definition at line 816 of file game.cpp.
References set().
Referenced by game_lua_kernel::impl_game_config_set(), and show_theme_dialog().
void preferences::set_tile_size | ( | const unsigned int | size | ) |
Definition at line 670 of file general.cpp.
References utf8::size().
Referenced by display::display(), and display::set_zoom().
void preferences::set_turbo | ( | bool | ison | ) |
Definition at line 474 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and play_controller::hotkey_handler::toggle_accelerated_speed().
void preferences::set_turbo_speed | ( | const double | speed | ) |
Definition at line 484 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::set_turn_bell | ( | bool | ison | ) |
Definition at line 680 of file general.cpp.
References sound::close_sound(), sound::init_sound(), music_on(), set(), sound_on(), sound::stop_bell(), turn_bell(), and UI_sound_on().
Referenced by game_launcher::game_launcher().
void preferences::set_turn_dialog | ( | bool | ison | ) |
Definition at line 421 of file game.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::set_UI_sound | ( | bool | ison | ) |
Definition at line 704 of file general.cpp.
References sound::close_sound(), sound::init_sound(), music_on(), set(), sound_on(), sound::stop_UI_sound(), turn_bell(), and UI_sound_on().
Referenced by game_launcher::game_launcher().
void preferences::set_UI_volume | ( | int | vol | ) |
Definition at line 655 of file general.cpp.
References sound::set_UI_volume(), and UI_volume().
void preferences::set_unmoved_color | ( | const std::string & | color_id | ) |
Definition at line 368 of file general.cpp.
Referenced by gui2::dialogs::select_orb_colors::post_show().
void preferences::set_use_map_settings | ( | bool | value | ) |
void preferences::set_use_twelve_hour_clock_format | ( | bool | value | ) |
void preferences::set_user_servers_list | ( | const std::vector< game_config::server_info > & | value | ) |
Definition at line 375 of file game.cpp.
References get_prefs().
Referenced by gui2::dialogs::mp_connect::on_server_add(), and gui2::dialogs::mp_connect::on_server_delete().
void preferences::set_village_gold | ( | int | value | ) |
void preferences::set_village_support | ( | int | value | ) |
void preferences::set_vsync | ( | bool | ison | ) |
Definition at line 460 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_whisper_friends_only | ( | bool | v | ) |
Definition at line 26 of file lobby.cpp.
References set().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::set_xp_modifier | ( | int | value | ) |
bool preferences::show_all_units_in_help | ( | ) |
bool preferences::show_ally_orb | ( | ) |
Definition at line 262 of file general.cpp.
References get(), and game_config::show_ally_orb.
Referenced by orb_status_helper::prefs_show_orb().
bool preferences::show_combat | ( | ) |
Definition at line 446 of file game.cpp.
References get().
Referenced by unit_display::unit_attack(), unit_display::unit_die(), unit_display::unit_draw_weapon(), and unit_display::unit_sheath_weapon().
bool preferences::show_disengaged_orb | ( | ) |
Definition at line 304 of file general.cpp.
References get(), and game_config::show_disengaged_orb.
Referenced by orb_status_helper::prefs_show_orb().
bool preferences::show_enemy_orb | ( | ) |
Definition at line 276 of file general.cpp.
References get(), and game_config::show_enemy_orb.
Referenced by orb_status_helper::prefs_show_orb().
bool preferences::show_floating_labels | ( | ) |
Definition at line 823 of file game.cpp.
References get().
Referenced by game_display::float_label(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::show_fps | ( | ) |
Definition at line 895 of file general.cpp.
Referenced by events::console_handler::do_fps(), and display::draw().
bool preferences::show_moved_orb | ( | ) |
Definition at line 283 of file general.cpp.
References get(), and game_config::show_moved_orb.
Referenced by orb_status_helper::prefs_show_orb().
bool preferences::show_partial_orb | ( | ) |
Definition at line 297 of file general.cpp.
References get(), and game_config::show_partial_orb.
Referenced by orb_status_helper::prefs_show_orb().
bool preferences::show_side_colors | ( | ) |
Definition at line 746 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and unit_drawer::redraw_unit().
bool preferences::show_standing_animations | ( | ) |
Definition at line 51 of file display.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), unit_animation_component::set_selecting(), and unit_animation_component::set_standing().
bool preferences::show_status_on_ally_orb | ( | ) |
Definition at line 269 of file general.cpp.
References get(), and game_config::show_status_on_ally_orb.
bool preferences::show_theme_dialog | ( | ) |
Definition at line 65 of file display.cpp.
References _(), resources::gamedata, theme::get_basic_theme_info(), display::get_singleton(), gui2::dialogs::theme_list::selected_index(), gui2::dialogs::theme_list::set_selected_index(), display::set_theme(), set_theme(), gui2::dialogs::modal_dialog::show(), gui2::show_transient_message(), and theme().
Referenced by events::console_handler::do_theme(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::show_unmoved_orb | ( | ) |
Definition at line 290 of file general.cpp.
References get(), and game_config::show_unmoved_orb.
Referenced by orb_status_helper::prefs_show_orb().
void preferences::show_wesnothd_server_search | ( | ) |
Definition at line 99 of file display.cpp.
References _(), filesystem::directory_name(), filesystem::get_exe_dir(), get_mp_server_program_name(), filesystem::is_directory(), wfl::msg(), game_config::path, gui2::dialogs::file_dialog::set_filename(), gui2::dialogs::file_dialog::set_message(), set_mp_server_program_name(), gui2::dialogs::file_dialog::set_ok_label(), gui2::dialogs::file_dialog::set_path(), gui2::dialogs::file_dialog::set_read_only(), gui2::dialogs::file_dialog::set_title(), and VGETTEXT.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and game_launcher::play_multiplayer().
bool preferences::shroud | ( | ) |
Definition at line 535 of file game.cpp.
References get().
Referenced by team::team_info::handle_legacy_share_vision(), gui2::dialogs::editor_edit_side::pre_show(), gui2::dialogs::mp_create_game::pre_show(), team::set_shroud(), and ng::configure_engine::shroud_game_default().
bool preferences::shuffle_sides | ( | ) |
Definition at line 461 of file game.cpp.
References get().
Referenced by gui2::dialogs::mp_create_game::pre_show(), and ng::configure_engine::shuffle_sides_default().
bool preferences::skip_ai_moves | ( | ) |
Definition at line 731 of file game.cpp.
References get().
Referenced by ai::move_result::do_execute(), ai::recall_result::do_execute(), ai::recruit_result::do_execute(), gui2::dialogs::preferences_dialog::initialize_callbacks(), and SYNCED_COMMAND_HANDLER_FUNCTION().
bool preferences::skip_mp_replay | ( | ) |
Definition at line 581 of file game.cpp.
References get().
Referenced by gui2::dialogs::mp_lobby::pre_show().
std::size_t preferences::sound_buffer_size | ( | ) |
Definition at line 575 of file general.cpp.
Referenced by sound::init_sound(), and sound::driver_status::query().
bool preferences::sound_on | ( | ) |
Definition at line 728 of file general.cpp.
References get().
Referenced by hotkey::command_executor::execute_command_wrap(), game_launcher::game_launcher(), countdown_clock::maybe_play_sound(), sound::play_sound(), sound::play_sound_positioned(), sound::play_timer(), sound::reset_sound(), set_music(), set_sound(), set_turn_bell(), and set_UI_sound().
int preferences::sound_volume | ( | ) |
Definition at line 620 of file general.cpp.
Referenced by impl_audio_get(), impl_audio_set(), sound::init_sound(), load_game_prefs(), and set_sound_volume().
bool preferences::stop_music_in_background | ( | ) |
Definition at line 777 of file general.cpp.
References get().
Referenced by sound::music_muter::handle_window_event(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::sub_achievement | ( | const std::string & | content_for, |
const std::string & | id, | ||
const std::string & | sub_id | ||
) |
content_for | The achievement group the achievement is part of. |
id | The ID of the achievement within the achievement group. |
sub_id | The ID of the sub-achievement within the achievement. |
Definition at line 1132 of file general.cpp.
References achievement(), and utils::split().
Referenced by achievement::achievement(), and game_lua_kernel::intf_has_sub_achievement().
std::string preferences::theme | ( | ) |
Definition at line 801 of file game.cpp.
References get(), and video::headless().
Referenced by show_theme_dialog().
unsigned int preferences::tile_size | ( | ) |
Definition at line 665 of file general.cpp.
Referenced by display::display().
void preferences::toggle_minimap_draw_terrain | ( | ) |
Definition at line 880 of file general.cpp.
References minimap_draw_terrain(), and set().
Referenced by hotkey::command_executor::do_execute_command().
void preferences::toggle_minimap_draw_units | ( | ) |
Definition at line 860 of file general.cpp.
References minimap_draw_units(), and set().
Referenced by hotkey::command_executor::do_execute_command().
void preferences::toggle_minimap_draw_villages | ( | ) |
Definition at line 870 of file general.cpp.
References minimap_draw_villages(), and set().
Referenced by hotkey::command_executor::do_execute_command().
void preferences::toggle_minimap_movement_coding | ( | ) |
Definition at line 840 of file general.cpp.
References minimap_movement_coding(), and set().
Referenced by hotkey::command_executor::do_execute_command().
void preferences::toggle_minimap_terrain_coding | ( | ) |
Definition at line 850 of file general.cpp.
References minimap_terrain_coding(), and set().
Referenced by hotkey::command_executor::do_execute_command().
bool preferences::turbo | ( | ) |
Definition at line 465 of file general.cpp.
References get(), and video::headless().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), play_controller::hotkey_handler::toggle_accelerated_speed(), and display::turbo_speed().
double preferences::turbo_speed | ( | ) |
Definition at line 479 of file general.cpp.
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and display::turbo_speed().
bool preferences::turn_bell | ( | ) |
Definition at line 675 of file general.cpp.
References get().
Referenced by playsingle_controller::before_human_turn(), game_launcher::game_launcher(), countdown_clock::maybe_play_sound(), sound::play_bell(), sound::reset_sound(), set_music(), set_sound(), set_turn_bell(), and set_UI_sound().
bool preferences::turn_dialog | ( | ) |
Definition at line 416 of file game.cpp.
References get().
Referenced by gui2::dialogs::preferences_dialog::initialize_callbacks(), and playsingle_controller::show_turn_dialog().
int preferences::turns | ( | ) |
Definition at line 545 of file game.cpp.
References get(), and settings::get_turns().
Referenced by editor::context_manager::edit_scenario_dialog(), gui2::dialogs::editor_edit_scenario::editor_edit_scenario(), ai::configuration::expand_simplified_aspects(), ai::default_recruitment::recruitment::get_estimated_income(), ai::readonly_context_proxy::is_active(), ai::readonly_context_impl::is_active(), pathfind::mark_route(), ng::configure_engine::num_turns_default(), gui2::dialogs::mp_create_game::pre_show(), and editor::map_context::set_scenario_setup().
bool preferences::UI_sound_on | ( | ) |
Definition at line 699 of file general.cpp.
References get().
Referenced by game_launcher::game_launcher(), countdown_clock::maybe_play_sound(), sound::play_UI_sound(), mp::ui_alerts::ready_for_start(), sound::reset_sound(), set_music(), set_sound(), set_turn_bell(), and set_UI_sound().
int preferences::UI_volume | ( | ) |
Definition at line 650 of file general.cpp.
Referenced by sound::init_sound(), and set_UI_volume().
std::string preferences::unmoved_color | ( | ) |
Definition at line 362 of file general.cpp.
References fix_orb_color_name(), get(), and game_config::colors::unmoved_orb_color.
Referenced by orb_status_helper::get_orb_color(), image::getMinimap(), gui2::dialogs::select_orb_colors::pre_show(), and image::render_minimap().
bool preferences::use_color_cursors | ( | ) |
Definition at line 915 of file general.cpp.
References get().
bool preferences::use_map_settings | ( | ) |
Definition at line 481 of file game.cpp.
References get().
Referenced by ng::flg_manager::flg_manager(), gui2::dialogs::mp_join_game::show_flg_select(), gui2::dialogs::mp_create_game::update_map_settings(), and ng::configure_engine::use_map_settings_default().
bool preferences::use_twelve_hour_clock_format | ( | ) |
Definition at line 974 of file general.cpp.
References get().
Referenced by gui2::dialogs::format_addon_time(), savegame::save_info::format_time_local(), utils::format_time_summary(), get_chat_timestamp(), and REPORT_GENERATOR().
std::vector< game_config::server_info > preferences::user_servers_list | ( | ) |
Definition at line 362 of file game.cpp.
References get_prefs().
int preferences::village_gold | ( | ) |
Definition at line 651 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 661 of file game.cpp.
References get(), and settings::get_village_support().
Referenced by ng::configure_engine::village_support_default().
bool preferences::vsync | ( | ) |
Definition at line 439 of file general.cpp.
References get().
Referenced by video::init_window(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
bool preferences::whisper_friends_only | ( | ) |
Definition at line 21 of file lobby.cpp.
References get().
Referenced by gui2::chatbox::add_whisper_received(), and gui2::dialogs::preferences_dialog::initialize_callbacks().
void preferences::write_preferences | ( | ) |
Definition at line 141 of file general.cpp.
References ERR_FS, filesystem::get_prefs_file(), filesystem::ostream_file(), save_credentials(), and write().
Referenced by events::console_handler::do_set_alias(), gui2::dialogs::preferences_dialog::post_show(), and preferences::base_manager::~base_manager().
int preferences::xp_modifier | ( | ) |
Definition at line 671 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 953 of file game.cpp.
References get().
Referenced by events::menu_handler::end_turn().
const int preferences::def_window_height = 720 |
Definition at line 70 of file general.cpp.
Referenced by resolution(), and video::update_framebuffer().
const int preferences::def_window_width = 1280 |
Definition at line 69 of file general.cpp.
Referenced by resolution(), and video::update_framebuffer().
prefs_event_handler preferences::event_handler_ |
Definition at line 88 of file general.cpp.
Referenced by preferences::base_manager::base_manager(), and preferences::base_manager::~base_manager().
const int preferences::INFINITE_AUTO_SAVES = 61 |
Definition at line 208 of file game.hpp.
Referenced by playsingle_controller::before_human_turn(), and play_controller::do_autosave().
const int preferences::max_font_scaling = 150 |
Definition at line 76 of file general.cpp.
Referenced by font_scaling(), and set_font_scaling().
const int preferences::max_pixel_scale = 4 |
Definition at line 79 of file general.cpp.
Referenced by pixel_scale(), set_pixel_scale(), and video::update_framebuffer().
const int preferences::max_window_height = 1080 |
Definition at line 73 of file general.cpp.
Referenced by video::update_framebuffer().
const int preferences::max_window_width = 1920 |
Definition at line 72 of file general.cpp.
Referenced by video::update_framebuffer().
const int preferences::min_font_scaling = 80 |
Definition at line 75 of file general.cpp.
Referenced by font_scaling(), and set_font_scaling().
const int preferences::min_pixel_scale = 1 |
Definition at line 78 of file general.cpp.
Referenced by pixel_scale(), and set_pixel_scale().
const int preferences::min_window_height = 540 |
Definition at line 67 of file general.cpp.
Referenced by video::get_available_resolutions(), video::init_window(), resolution(), and video::update_framebuffer().
const int preferences::min_window_width = 800 |
Definition at line 66 of file general.cpp.
Referenced by video::get_available_resolutions(), video::init_window(), resolution(), and video::update_framebuffer().
|
static |
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 52 of file preferences_dialog.hpp.
|
static |
Definition at line 24 of file advanced.cpp.
Referenced by get_advanced_preferences(), and init_advanced_manager().