16 #define GETTEXT_DOMAIN "wesnoth-lib"
33 const int selected_row
34 = find_widget<listbox>(
"core_list")
38 = find_widget<multi_page>(
"core_details");
46 listbox& list = find_widget<listbox>(
"core_list");
54 = find_widget<multi_page>(
"core_details");
56 for(
const auto & core :
cores_)
62 list_item[
"label"] = core[
"image"];
63 list_item_item.emplace(
"image", list_item);
65 list_item[
"label"] = core[
"name"];
66 list_item_item.emplace(
"name", list_item);
75 detail_item[
"label"] = core[
"description"];
76 detail_item[
"use_markup"] =
"true";
77 detail_page.emplace(
"description", detail_item);
88 choice_ = find_widget<listbox>(
"core_list")
const std::vector< config > & cores_
Contains the config objects for all cores.
int choice_
The chosen core.
virtual void post_show() override
Actions to be taken after the window has been shown.
virtual void pre_show() override
Actions to be taken before showing the window.
void core_selected()
Called when another core is selected.
grid & add_row(const widget_item &item, const int index=-1)
When an item in the list is selected by the user we need to update the state.
bool select_row(const unsigned row, const bool select=true)
Selects a row.
grid & add_page(const widget_item &item)
Adds single page to the grid.
void select_page(const unsigned page, const bool select=true)
Selects a page.
void keyboard_capture(widget *widget)
REGISTER_DIALOG(editor_edit_unit)
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification &signal)
Connects a signal handler for getting a notification upon modification.
std::map< std::string, widget_item > widget_data
std::map< std::string, t_string > widget_item