16 #define GETTEXT_DOMAIN "wesnoth-lib"
34 const int selected_row
35 = find_widget<listbox>(
this,
"core_list",
false)
39 = find_widget<multi_page>(
this,
"core_details",
false);
47 listbox& list = find_widget<listbox>(&
window,
"core_list",
false);
55 = find_widget<multi_page>(&
window,
"core_details",
false);
57 for(
const auto & core :
cores_)
63 list_item[
"label"] = core[
"image"];
64 list_item_item.emplace(
"image", list_item);
66 list_item[
"label"] = core[
"name"];
67 list_item_item.emplace(
"name", list_item);
76 detail_item[
"label"] = core[
"description"];
77 detail_item[
"use_markup"] =
"true";
78 detail_page.emplace(
"description", detail_item);
virtual void post_show(window &window) override
Actions to be taken after the window has been shown.
const std::vector< config > & cores_
Contains the config objects for all cores.
int choice_
The chosen core.
void core_selected()
Called when another core is selected.
virtual void pre_show(window &window) override
Actions to be taken before showing the window.
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.
base class of top level items, the only item which needs to store the final canvases to draw on.
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