Classes | |
class | unit_preview_pane |
class | units_list_preview_pane |
class | unit_types_preview_pane |
class | campaign_preview_pane |
class | file_dialog |
Functions | |
void | advance_unit (const gamemap &map, unit_map &units, gamemap::location loc, game_display &gui, bool random_choice, const bool add_replay_event) |
bool | animate_unit_advancement (unit_map &units, gamemap::location loc, game_display &gui, size_t choice) |
void | show_objectives (game_display &disp, const config &level, const std::string &objectives) |
bool | is_illegal_file_char (char c) |
int | get_save_name (display &disp, const std::string &message, const std::string &txt_label, std::string *fname, gui::DIALOG_TYPE dialog_type, const std::string &title, const bool has_exit_button, const bool ask_for_filename) |
std::string | format_time_summary (time_t t) |
std::string | load_game_dialog (display &disp, const config &game_config, bool *show_replay, bool *cancel_orders) |
void | show_unit_description (game_display &disp, const unit &u) |
void | show_unit_description (game_display &disp, const unit_type &t) |
static network::connection | network_data_dialog (display &disp, const std::string &msg, config &cfg, network::connection connection_num, network::statistics(*get_stats)(network::connection handle)) |
network::connection | network_send_dialog (display &disp, const std::string &msg, config &cfg, network::connection connection_num) |
network::connection | network_receive_dialog (display &disp, const std::string &msg, config &cfg, network::connection connection_num) |
network::connection | network_connect_dialog (display &disp, const std::string &msg, const std::string &hostname, int port) |
int | show_file_chooser_dialog (display &displ, std::string &filename, std::string const &title, int xloc=-1, int yloc=-1) |
Show a dialog where the user can navigate through files and select a file. | |
Variables | |
static const int | save_preview_border = 10 |
static const int | unit_preview_border = 10 |
static const int | campaign_preview_border = font::relative_size(10) |
void dialogs::advance_unit | ( | const gamemap & | map, | |
unit_map & | units, | |||
gamemap::location | loc, | |||
game_display & | gui, | |||
bool | random_choice, | |||
const bool | add_replay_event | |||
) |
Definition at line 49 of file dialogs.cpp.
References _, unit::absolute_image(), replay::add_advancement(), animate_unit_advancement(), replay::choose_option(), COLUMN_SEPARATOR, preferences::encountered_units(), unit_map::end(), lg::engine, lg::err, unit_map::find(), get_advanced_unit(), IMAGE_PREFIX, LOG_DP, LOG_STREAM, gui::OK_ONLY, recorder, gui::dialog::set_menu(), gui::dialog::set_panes(), gui::dialog::show(), size, type, and unit::type_name().
Referenced by animate_unit_advancement(), ai_interface::attack_enemy(), and events::mouse_handler::attack_enemy_().
bool dialogs::animate_unit_advancement | ( | unit_map & | units, | |
gamemap::location | loc, | |||
game_display & | gui, | |||
size_t | choice | |||
) |
Definition at line 147 of file dialogs.cpp.
References unit_animator::add_animation(), unit::add_modification(), advance_unit(), game_display::draw(), unit_map::end(), unit_map::find(), game_events::fire(), unit::get_experience(), game_display::invalidate(), display::invalidate_all(), game_display::invalidate_unit(), LOG_NG, unit::max_experience(), events::pump(), unit_map::replace(), unit_animator::start_animations(), CVideo::update_locked(), display::video(), and unit_animator::wait_for_end().
Referenced by advance_unit(), and do_replay_handle().
std::string dialogs::@43::format_time_summary | ( | time_t | t | ) | [static] |
int dialogs::get_save_name | ( | display & | disp, | |
const std::string & | message, | |||
const std::string & | txt_label, | |||
std::string * | fname, | |||
gui::DIALOG_TYPE | dialog_type, | |||
const std::string & | title, | |||
const bool | has_exit_button, | |||
const bool | ask_for_filename | |||
) |
Definition at line 232 of file dialogs.cpp.
References _, gui::dialog::add_button(), gui::dialog::BUTTON_CHECKBOX, gui::dialog::BUTTON_STANDARD, is_gzip_file(), is_illegal_file_char(), gui::dialog::option_checked(), save_game_exists(), gui::dialog::set_textbox(), gui::dialog::show(), gui::dialog::textbox_text(), gui::button::TYPE_CHECK, gui::button::TYPE_PRESS, display::video(), and gui::YES_NO.
Referenced by play_game(), and events::menu_handler::save_game().
bool dialogs::is_illegal_file_char | ( | char | c | ) |
Definition at line 223 of file dialogs.cpp.
Referenced by get_save_name(), and events::menu_handler::save_game().
std::string dialogs::load_game_dialog | ( | display & | disp, | |
const config & | game_config, | |||
bool * | show_replay, | |||
bool * | cancel_orders | |||
) |
Definition at line 650 of file dialogs.cpp.
References _, gui::dialog::add_button(), gui::dialog::add_option(), gui::dialog::add_pane(), gui::dialog::BUTTON_HELP, gui::dialog::BUTTON_STANDARD, cfg, COLUMN_SEPARATOR, format_time_summary(), get_saves_list(), HEADING_PREFIX, gui::NULL_DIALOG, gui::OK_CANCEL, gui::dialog::option_checked(), save_summary(), gui::menu::basic_sorter::set_alpha_sort(), gui::dialog::set_basic_behavior(), gui::dialog::set_textbox(), gui::dialog::show(), utils::string_bool(), utils::truncate_as_wstring(), display::video(), cursor::WAIT, and write_save_index().
Referenced by mp::connect::load_game(), and events::menu_handler::load_game().
network::connection dialogs::network_connect_dialog | ( | display & | disp, | |
const std::string & | msg, | |||
const std::string & | hostname, | |||
int | port | |||
) |
Definition at line 1272 of file dialogs.cpp.
References _, network::connect(), gui::dialog_frame::default_style, display::flip(), display::h(), events::raise_draw_event(), display::video(), and display::w().
Referenced by open_connection().
static network::connection dialogs::network_data_dialog | ( | display & | disp, | |
const std::string & | msg, | |||
config & | cfg, | |||
network::connection | connection_num, | |||
network::statistics(*)(network::connection handle) | get_stats | |||
) | [static] |
Definition at line 1168 of file dialogs.cpp.
References _, config::clear(), network::statistics::current, network::statistics::current_max, gui::dialog_frame::default_style, display::flip(), get_stats(), display::h(), gui::widget::height(), events::pump(), events::raise_draw_event(), network::receive_data(), stream, display::video(), display::w(), and gui::widget::width().
Referenced by network_receive_dialog(), and network_send_dialog().
network::connection dialogs::network_receive_dialog | ( | display & | disp, | |
const std::string & | msg, | |||
config & | cfg, | |||
network::connection | connection_num | |||
) |
Definition at line 1233 of file dialogs.cpp.
References network::get_receive_stats(), and network_data_dialog().
Referenced by mp::wait::join_game(), open_connection(), play_game(), and playmp_controller::wait_for_upload().
network::connection dialogs::network_send_dialog | ( | display & | disp, | |
const std::string & | msg, | |||
config & | cfg, | |||
network::connection | connection_num | |||
) |
Definition at line 1227 of file dialogs.cpp.
References network::get_send_stats(), and network_data_dialog().
int dialogs::show_file_chooser_dialog | ( | display & | displ, | |
std::string & | filename, | |||
std::string const & | title, | |||
int | xloc = -1 , |
|||
int | yloc = -1 | |||
) |
Show a dialog where the user can navigate through files and select a file.
The filename is used as a starting point in the navigation and contains the chosen file when the function returns. Return the index of the button pressed, or -1 if the dialog was canceled through keypress.
Definition at line 32 of file filechooser.cpp.
References dialogs::file_dialog::get_choice(), gui::dialog::result(), and gui::dialog::show().
Referenced by map_editor::edit_load_map(), map_editor::edit_save_as(), and events::menu_handler::save_map().
void dialogs::show_objectives | ( | game_display & | disp, | |
const config & | level, | |||
const std::string & | objectives | |||
) |
Definition at line 210 of file dialogs.cpp.
References _, name, and replace_underbar2space().
Referenced by events::menu_handler::objectives(), and play_controller::play_slice().
void dialogs::show_unit_description | ( | game_display & | disp, | |
const unit_type & | t | |||
) |
Definition at line 1077 of file dialogs.cpp.
References unit_type::hide_help(), unit_type::id(), and help::show_unit_help().
void dialogs::show_unit_description | ( | game_display & | disp, | |
const unit & | u | |||
) |
Definition at line 1067 of file dialogs.cpp.
References help::show_unit_help(), unit::type(), and unit::type_id().
Referenced by dialogs::unit_types_preview_pane::process_event(), dialogs::units_list_preview_pane::process_event(), and events::menu_handler::unit_description().
const int dialogs::campaign_preview_border = font::relative_size(10) [static] |
Definition at line 1084 of file dialogs.cpp.
Referenced by dialogs::campaign_preview_pane::draw_contents().
const int dialogs::save_preview_border = 10 [static] |
Definition at line 408 of file dialogs.cpp.
const int dialogs::unit_preview_border = 10 [static] |
Definition at line 755 of file dialogs.cpp.
Referenced by dialogs::unit_preview_pane::draw_contents().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |