dialogs Namespace Reference

Various uncategorised dialogs. More...


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)


Detailed Description

Various uncategorised dialogs.

Function Documentation

void dialogs::advance_unit ( const gamemap map,
unit_map units,
gamemap::location  loc,
game_display gui,
bool  random_choice,
const bool  add_replay_event 
)

bool dialogs::animate_unit_advancement ( unit_map units,
gamemap::location  loc,
game_display gui,
size_t  choice 
)

std::string dialogs::@43::format_time_summary ( time_t  t  )  [static]

Definition at line 603 of file dialogs.cpp.

References _, and buf.

Referenced by load_game_dialog().

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 
)

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 
)

network::connection dialogs::network_connect_dialog ( display disp,
const std::string &  msg,
const std::string &  hostname,
int  port 
)

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]

network::connection dialogs::network_receive_dialog ( display disp,
const std::string &  msg,
config cfg,
network::connection  connection_num 
)

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 
)


Variable Documentation

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