16 #define GETTEXT_DOMAIN "wesnoth-lib" 34 : items_(
items), result_(-1)
41 message =
_(
"The currently chosen scenario " 42 "is not compatible with your setup." 43 "\nPlease select a compatible one.");
46 message =
_(
"The currently chosen era " 47 "is not compatible with your setup." 48 "\nPlease select a compatible one.");
52 message =
_(
"The currently chosen modification " 53 "is not compatible with your setup." 54 "\nPlease select a compatible one.");
57 register_label(
"message",
false, message);
62 listbox&
items = find_widget<listbox>(&window,
"itemlist",
false);
66 std::map<std::string, string_map> data;
67 data[
"option"][
"label"] =
item;
78 listbox&
items = find_widget<listbox>(&window,
"itemlist",
false);
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
int result_
the index of the selected item
Main class to show messages to the user.
const std::vector< std::string > items
int get_selected_row() const
Returns the first selected row.
static std::string _(const char *str)
bool select_row(const unsigned row, const bool select=true)
Selects a row.
This file contains the settings handling of the widget library.
std::vector< std::string > items_
the options available
Offers a list of compatible items if a currently selected one is incompatible.
grid & add_row(const string_map &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
int get_retval() const
Returns the cached window exit code.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
Dialog was closed with the OK button.
base class of top level items, the only item which needs to store the final canvases to draw on...
std::pair< std::string, unsigned > item