#include <game_load.hpp>
Public Member Functions | |
tgame_load (const config &cache_config) | |
const std::string & | filename () const |
bool | change_difficulty () const |
bool | show_replay () const |
bool | cancel_orders () const |
const config & | summary () |
Public Member Functions inherited from gui2::tdialog | |
tdialog () | |
virtual | ~tdialog () |
bool | show (CVideo &video, const unsigned auto_close_time=0) |
Shows the window. More... | |
int | get_retval () const |
void | set_always_save_fields (const bool always_save_fields) |
void | set_restore (const bool restore) |
Protected Member Functions | |
void | pre_show (twindow &window) |
Inherited from tdialog. More... | |
void | post_show (twindow &window) |
Inherited from tdialog. More... | |
Protected Member Functions inherited from gui2::tdialog | |
tfield_bool * | register_bool (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value=std::function< bool()>(), const std::function< void(const bool)> &callback_save_value=std::function< void(const bool)>(), const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>()) |
Creates a new boolean field. More... | |
tfield_bool * | register_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>()) |
Creates a new boolean field. More... | |
tfield_integer * | register_integer (const std::string &id, const bool mandatory, const std::function< int()> &callback_load_value=std::function< int()>(), const std::function< void(const int)> &callback_save_value=std::function< void(const int)>()) |
Creates a new integer field. More... | |
tfield_integer * | register_integer (const std::string &id, const bool mandatory, int &linked_variable) |
Creates a new integer field. More... | |
tfield_text * | register_text (const std::string &id, const bool mandatory, const std::function< std::string()> &callback_load_value=std::function< std::string()>(), const std::function< void(const std::string &)> &callback_save_value=std::function< void(const std::string &)>(), const bool capture_focus=false) |
Creates a new text field. More... | |
tfield_text * | register_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false) |
Creates a new text field. More... | |
tfield_label * | register_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false) |
Registers a new control as a label. More... | |
tfield_label * | register_image (const std::string &id, const bool mandatory, const std::string &filename) |
Registers a new control as image. More... | |
Private Member Functions | |
virtual const std::string & | window_id () const |
Inherited from tdialog, implemented by REGISTER_DIALOG. More... | |
void | filter_text_changed (ttext_ *textbox, const std::string &text) |
void | list_item_clicked (twindow &window) |
void | delete_button_callback (twindow &window) |
void | display_savegame (twindow &window) |
void | evaluate_summary_string (std::stringstream &str, const config &cfg_summary) |
bool | compare_name (unsigned i1, unsigned i2) const |
bool | compare_date (unsigned i1, unsigned i2) const |
bool | compare_name_rev (unsigned i1, unsigned i2) const |
bool | compare_date_rev (unsigned i1, unsigned i2) const |
void | fill_game_list (twindow &window, std::vector< savegame::save_info > &games) |
Private Attributes | |
tfield_text * | txtFilter_ |
tfield_bool * | chk_change_difficulty_ |
tfield_bool * | chk_show_replay_ |
tfield_bool * | chk_cancel_orders_ |
std::string | filename_ |
bool | change_difficulty_ |
bool | show_replay_ |
bool | cancel_orders_ |
std::vector< savegame::save_info > | games_ |
const config & | cache_config_ |
std::vector< std::string > | last_words_ |
config | summary_ |
Definition at line 28 of file game_load.hpp.
|
explicit |
Definition at line 91 of file game_load.cpp.
|
inline |
Definition at line 45 of file game_load.hpp.
References cancel_orders_.
Referenced by savegame::loadgame::show_dialog().
|
inline |
Definition at line 37 of file game_load.hpp.
References change_difficulty_.
Referenced by savegame::loadgame::show_dialog().
|
private |
|
private |
|
private |
|
private |
Definition at line 388 of file game_load.cpp.
References preferences::ask_delete_saves(), savegame::delete_game(), display_savegame(), gui2::tgame_delete::execute(), games_, gui2::tlistbox::get_selected_row(), and gui2::tlistbox::remove_row().
Referenced by pre_show().
Definition at line 261 of file game_load.cpp.
References config::empty(), evaluate_summary_string(), filename_, savegame::save_info::format_time_local(), games_, savegame::loadgame::is_replay_save(), savegame::save_info::name(), gui2::ttoggle_button::set_active(), gui2::set_label(), gui2::ttoggle_button::set_value(), savegame::save_info::summary(), and summary().
Referenced by delete_button_callback(), list_item_clicked(), and pre_show().
|
private |
Definition at line 311 of file game_load.cpp.
References _(), c, cache_config_, game_config::debug, config::find_child(), savegame::loadgame::is_replay_save(), lexical_cast(), ng::depcheck::SCENARIO, string_table, and vgettext().
Referenced by display_savegame().
|
inline |
Definition at line 33 of file game_load.hpp.
References filename_.
Referenced by savegame::loadgame::show_dialog().
|
private |
Definition at line 168 of file game_load.cpp.
References gui2::tlistbox::add_row(), gui2::tlistbox::clear(), compare_date(), compare_date_rev(), compare_name(), compare_name_rev(), utils::ellipsis_truncate(), and gui2::tlistbox::set_column_order().
Referenced by pre_show().
|
private |
Definition at line 203 of file game_load.cpp.
References gui2::tgrid::begin(), chars_equal_insensitive(), gui2::tlistbox::get_item_count(), gui2::tlistbox::get_row_grid(), gui2::twidget::get_window(), i, gui2::tcontrol::label(), last_words_, gui2::tlistbox::set_row_shown(), utils::split(), and t_string::str().
Referenced by pre_show().
Definition at line 198 of file game_load.cpp.
References display_savegame().
Referenced by pre_show().
Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 248 of file game_load.cpp.
References cancel_orders_, change_difficulty_, chk_cancel_orders_, chk_change_difficulty_, chk_show_replay_, games_, gui2::tfield< T, W, CT >::get_widget_value(), show_replay_, and summary_.
Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 107 of file game_load.cpp.
References cache_config_, gui2::event::connect_signal_mouse_left_click(), gui2::event::connect_signal_notify_modified(), delete_button_callback(), display_savegame(), fill_game_list(), filter_text_changed(), games_, savegame::get_saves_list(), list_item_clicked(), gui2::tlistbox::set_callback_value_change(), gui2::ttext_::set_text_changed_callback(), txtFilter_, and cursor::WAIT.
|
inline |
Definition at line 41 of file game_load.hpp.
References show_replay_.
Referenced by savegame::loadgame::show_dialog().
|
inline |
Definition at line 49 of file game_load.hpp.
References summary_.
Referenced by display_savegame(), and savegame::loadgame::show_dialog().
|
privatevirtual |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
|
private |
Definition at line 92 of file game_load.hpp.
Referenced by evaluate_summary_string(), and pre_show().
|
private |
Definition at line 89 of file game_load.hpp.
Referenced by cancel_orders(), and post_show().
|
private |
Definition at line 87 of file game_load.hpp.
Referenced by change_difficulty(), and post_show().
|
private |
Definition at line 84 of file game_load.hpp.
Referenced by post_show().
|
private |
Definition at line 82 of file game_load.hpp.
Referenced by post_show().
|
private |
Definition at line 83 of file game_load.hpp.
Referenced by post_show().
|
private |
Definition at line 86 of file game_load.hpp.
Referenced by display_savegame(), and filename().
|
private |
Definition at line 91 of file game_load.hpp.
Referenced by compare_date(), compare_date_rev(), compare_name(), compare_name_rev(), delete_button_callback(), display_savegame(), post_show(), and pre_show().
|
private |
Definition at line 94 of file game_load.hpp.
Referenced by filter_text_changed().
|
private |
Definition at line 88 of file game_load.hpp.
Referenced by post_show(), and show_replay().
|
private |
Definition at line 96 of file game_load.hpp.
Referenced by post_show(), and summary().
|
private |
Definition at line 81 of file game_load.hpp.
Referenced by pre_show().