game_preferences.cpp File Reference

#include "global.hpp"
#include "config.hpp"
#include "filesystem.hpp"
#include "game_preferences.hpp"
#include "gamestatus.hpp"
#include "gettext.hpp"
#include "hotkeys.hpp"
#include "log.hpp"
#include "network.hpp"
#include "sound.hpp"
#include "settings.hpp"
#include "util.hpp"
#include "video.hpp"
#include "wml_exception.hpp"
#include "serialization/parser.hpp"
#include "serialization/string_utils.hpp"
#include <cstdlib>
#include <iostream>
#include <iterator>
#include <sstream>

Include dependency graph for game_preferences.cpp:

Go to the source code of this file.

Namespaces

namespace  preferences

Defines

#define GETTEXT_DOMAIN   "wesnoth-lib"

Functions

void add_relation (const std::string nick, const std::string relation)
 Add a nick to the specified relation setting.
void remove_relation (const std::string nick, const std::string relation)
 Remove a nick from the specified relation setting.
std::string preferences::get_friends ()
std::string preferences::get_ignores ()
bool preferences::add_friend (const std::string nick)
bool preferences::add_ignore (const std::string nick)
void preferences::remove_friend (const std::string nick)
void preferences::remove_ignore (const std::string nick)
void preferences::clear_friends ()
void preferences::clear_ignores ()
bool preferences::is_friend (const std::string nick)
bool preferences::is_ignored (const std::string nick)
bool preferences::show_lobby_join (const std::string &sender, const std::string &message)
int preferences::lobby_joins ()
void preferences::_set_lobby_joins (int show)
bool preferences::sort_list ()
void preferences::_set_sort_list (bool sort)
bool preferences::iconize_list ()
void preferences::_set_iconize_list (bool sort)
const std::vector
< game_config::server_info > & 
preferences::server_list ()
const std::string preferences::network_host ()
void preferences::set_network_host (const std::string &host)
unsigned int preferences::get_ping_timeout ()
void preferences::set_ping_timeout (unsigned int timeout)
const std::string preferences::campaign_server ()
void preferences::set_campaign_server (const std::string &host)
const std::string preferences::login ()
void preferences::set_login (const std::string &username)
bool preferences::turn_dialog ()
void preferences::set_turn_dialog (bool ison)
bool preferences::show_combat ()
bool preferences::allow_observers ()
void preferences::set_allow_observers (bool value)
bool preferences::use_map_settings ()
void preferences::set_use_map_settings (bool value)
bool preferences::random_start_time ()
void preferences::set_random_start_time (bool value)
bool preferences::fog ()
void preferences::set_fog (bool value)
bool preferences::shroud ()
void preferences::set_shroud (bool value)
int preferences::turns ()
void preferences::set_turns (int value)
bool preferences::skip_mp_replay ()
void preferences::set_skip_mp_replay (bool value)
bool preferences::countdown ()
void preferences::set_countdown (bool value)
int preferences::countdown_init_time ()
void preferences::set_countdown_init_time (int value)
int preferences::countdown_reservoir_time ()
void preferences::set_countdown_reservoir_time (int value)
int preferences::countdown_turn_bonus ()
void preferences::set_countdown_turn_bonus (int value)
int preferences::countdown_action_bonus ()
void preferences::set_countdown_action_bonus (int value)
int preferences::village_gold ()
void preferences::set_village_gold (int value)
int preferences::xp_modifier ()
void preferences::set_xp_modifier (int value)
int preferences::era ()
void preferences::set_era (int value)
int preferences::map ()
void preferences::set_map (int value)
bool preferences::show_ai_moves ()
void preferences::set_show_ai_moves (bool value)
void preferences::set_show_side_colours (bool value)
bool preferences::show_side_colours ()
void preferences::set_save_replays (bool value)
bool preferences::save_replays ()
void preferences::set_delete_saves (bool value)
bool preferences::delete_saves ()
void preferences::set_ask_delete_saves (bool value)
bool preferences::ask_delete_saves ()
int preferences::autosavemax ()
void preferences::set_autosavemax (int value)
std::string preferences::client_type ()
std::string preferences::clock_format ()
const std::string preferences::theme ()
void preferences::set_theme (const std::string &theme)
bool preferences::show_floating_labels ()
void preferences::set_show_floating_labels (bool value)
bool preferences::message_private ()
void preferences::set_message_private (bool value)
bool preferences::show_tip_of_day ()
bool preferences::show_haloes ()
void preferences::set_show_haloes (bool value)
bool preferences::flip_time ()
void preferences::set_flip_time (bool value)
bool preferences::upload_log ()
void preferences::set_upload_log (bool value)
const std::string preferences::upload_id ()
bool preferences::compress_saves ()
std::string preferences::get_chat_timestamp (const time_t &t)
bool preferences::chat_timestamping ()
void preferences::set_chat_timestamping (bool value)
int preferences::chat_lines ()
void preferences::set_chat_lines (int lines)
std::set< std::string > & preferences::encountered_units ()
std::set
< t_translation::t_terrain > & 
preferences::encountered_terrains ()
std::string preferences::custom_command ()
void preferences::set_custom_command (const std::string &command)
std::vector< std::string > * preferences::get_history (const std::string &id)
 Returns a pointer to the history vector associated with given id making a new one if it doesn't exist.
bool preferences::green_confirm ()
bool preferences::yellow_confirm ()
bool preferences::confirm_no_moves ()
void preferences::encounter_recruitable_units (std::vector< team > &teams)
void preferences::encounter_start_units (unit_map &units)
void preferences::encounter_recallable_units (game_state &gamestate)
void preferences::encounter_map_terrain (gamemap &map)

Variables

bool message_private_on = false
bool haloes = true
std::set< std::string > encountered_units_set
std::set
< t_translation::t_terrain
encountered_terrains_set
std::map< std::string,
std::vector< std::string > > 
history_map
const unsigned max_history_saved = 50


Define Documentation

#define GETTEXT_DOMAIN   "wesnoth-lib"

Definition at line 17 of file game_preferences.cpp.


Function Documentation

void @79::add_relation ( const std::string  nick,
const std::string  relation 
) [static]

Add a nick to the specified relation setting.

Definition at line 53 of file game_preferences.cpp.

References preferences::get(), utils::join(), r, preferences::set(), and utils::split().

Referenced by preferences::add_friend(), and preferences::add_ignore().

void @79::remove_relation ( const std::string  nick,
const std::string  relation 
) [static]

Remove a nick from the specified relation setting.

Definition at line 60 of file game_preferences.cpp.

References preferences::get(), utils::join(), r, halo::remove(), preferences::set(), and utils::split().

Referenced by preferences::remove_friend(), and preferences::remove_ignore().


Variable Documentation

std::set<std::string> encountered_units_set [static]

bool haloes = true [static]

Definition at line 44 of file game_preferences.cpp.

Referenced by preferences::set_show_haloes(), and preferences::show_haloes().

std::map<std::string, std::vector<std::string> > history_map [static]

const unsigned max_history_saved = 50 [static]

Definition at line 50 of file game_preferences.cpp.

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

bool message_private_on = false [static]


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs