#include <campaign_difficulty.hpp>


Public Member Functions | |
| tcampaign_difficulty (const std::vector< std::string > &items, const int default_difficulty=-1) | |
| int | selected_index () const |
| Returns the selected item index after displaying. | |
Private Member Functions | |
| virtual const std::string & | window_id () const |
| Inherited from tdialog, implemented by REGISTER_DIALOG. | |
| void | pre_show (CVideo &video, twindow &window) |
| Inherited from tdialog. | |
| void | post_show (twindow &window) |
| Inherited from tdialog. | |
Private Attributes | |
| int | index_ |
| std::vector< tlegacy_menu_item > | items_ |
| const int | default_difficulty_ |
Definition at line 26 of file campaign_difficulty.hpp.
| gui2::tcampaign_difficulty::tcampaign_difficulty | ( | const std::vector< std::string > & | items, | |
| const int | default_difficulty = -1 | |||
| ) | [explicit] |
Definition at line 65 of file campaign_difficulty.cpp.
| void gui2::tcampaign_difficulty::post_show | ( | twindow & | window | ) | [private, virtual] |
Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 103 of file campaign_difficulty.cpp.
References gui2::tdialog::get_retval(), gui2::tlistbox::get_selected_row(), index_, and gui2::twindow::OK.

Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 77 of file campaign_difficulty.cpp.
References gui2::tlistbox::add_row(), gui2::tlegacy_menu_item::description(), gui2::tlistbox::get_item_count(), gui2::tlegacy_menu_item::icon(), index_, gui2::tlegacy_menu_item::is_default(), items_, gui2::tlegacy_menu_item::label(), and gui2::tlistbox::select_row().

| int gui2::tcampaign_difficulty::selected_index | ( | ) | const [inline] |
Returns the selected item index after displaying.
Definition at line 37 of file campaign_difficulty.hpp.
References index_.
Referenced by game_controller::new_campaign(), and savegame::loadgame::show_difficulty_dialog().

| virtual const std::string& gui2::tcampaign_difficulty::window_id | ( | ) | const [private, virtual] |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
const int gui2::tcampaign_difficulty::default_difficulty_ [private] |
Definition at line 43 of file campaign_difficulty.hpp.
int gui2::tcampaign_difficulty::index_ [private] |
Definition at line 40 of file campaign_difficulty.hpp.
Referenced by post_show(), pre_show(), and selected_index().
std::vector<tlegacy_menu_item> gui2::tcampaign_difficulty::items_ [private] |
Definition at line 41 of file campaign_difficulty.hpp.
Referenced by pre_show().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |