#include <edit_side.hpp>
Public Member Functions | |
teditor_edit_side (int side, std::string &team_name, std::string &user_team_name, int &gold, int &income, int &village_income, int &village_support, bool &fog, bool &shroud, team::SHARE_VISION &share_vision, team::CONTROLLER &controller, bool &no_leader, bool &hidden) | |
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) |
Static Public Member Functions | |
static bool | execute (int side, std::string &team_name, std::string &user_team_name, int &gold, int &income, int &village_income, int &village_support, bool &fog, bool &shroud, team::SHARE_VISION &share_vision, team::CONTROLLER &controller, bool &no_leader, bool &hidden, CVideo &video) |
The execute function see tdialog for more information. More... | |
Private Member Functions | |
void | pre_show (twindow &window) |
Actions to be taken before showing the window. More... | |
void | post_show (twindow &window) |
Actions to be taken after the window has been shown. More... | |
template<typename T > | |
void | register_radio_toggle (const std::string &toggle_id, tgroup< T > &group, const T &enum_value, T ¤t_value, twindow &window) |
virtual const std::string & | window_id () const |
Inherited from tdialog, implemented by REGISTER_DIALOG. More... | |
Private Attributes | |
team::CONTROLLER & | controller_ |
tgroup< team::CONTROLLER > | controller_group |
team::SHARE_VISION & | share_vision_ |
tgroup< team::SHARE_VISION > | vision_group |
Additional Inherited Members | |
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... | |
Definition at line 27 of file edit_side.hpp.
gui2::teditor_edit_side::teditor_edit_side | ( | int | side, |
std::string & | team_name, | ||
std::string & | user_team_name, | ||
int & | gold, | ||
int & | income, | ||
int & | village_income, | ||
int & | village_support, | ||
bool & | fog, | ||
bool & | shroud, | ||
team::SHARE_VISION & | share_vision, | ||
team::CONTROLLER & | controller, | ||
bool & | no_leader, | ||
bool & | hidden | ||
) |
Definition at line 53 of file edit_side.cpp.
Referenced by execute().
|
inlinestatic |
The execute function see tdialog for more information.
Definition at line 45 of file edit_side.hpp.
References teditor_edit_side().
Referenced by editor::context_manager::edit_side_dialog().
Actions to be taken after the window has been shown.
At this point the registered fields already stored their values (if the OK has been pressed).
window | The window which has been shown. |
Reimplemented from gui2::tdialog.
Definition at line 110 of file edit_side.cpp.
References controller_, controller_group, gui2::tgroup< T >::get_active_member_value(), share_vision_, and vision_group.
Actions to be taken before showing the window.
At this point the registered fields are registered and initialized with their initial values.
window | The window to be shown. |
Reimplemented from gui2::tdialog.
Definition at line 89 of file edit_side.cpp.
References controller_, controller_group, compression::NONE, share_vision_, and vision_group.
|
private |
Definition at line 101 of file edit_side.cpp.
References gui2::tgroup< T >::add_member(), and gui2::ttoggle_button::set_value().
|
privatevirtual |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
|
private |
Definition at line 82 of file edit_side.hpp.
Referenced by post_show(), and pre_show().
|
private |
Definition at line 83 of file edit_side.hpp.
Referenced by post_show(), and pre_show().
|
private |
Definition at line 85 of file edit_side.hpp.
Referenced by post_show(), and pre_show().
|
private |
Definition at line 86 of file edit_side.hpp.
Referenced by post_show(), and pre_show().