15 #define GETTEXT_DOMAIN "wesnoth-lib" 71 const int selected_row
72 = find_widget<listbox>(&window,
"core_list",
false)
76 = find_widget<multi_page>(&window,
"core_details",
false);
84 listbox& list = find_widget<listbox>(&window,
"core_list",
false);
88 window.keyboard_capture(&list);
92 = find_widget<multi_page>(&window,
"core_details",
false);
94 for(
const auto & core :
cores_)
98 std::map<std::string, string_map> list_item_item;
100 list_item[
"label"] = core[
"image"];
101 list_item_item.emplace(
"image", list_item);
103 list_item[
"label"] = core[
"name"];
104 list_item_item.emplace(
"name", list_item);
111 std::map<std::string, string_map> detail_page;
113 detail_item[
"label"] = core[
"description"];
114 detail_item[
"use_markup"] =
"true";
115 detail_page.emplace(
"description", detail_item);
126 choice_ = find_widget<listbox>(&window,
"core_list",
false)
int choice_
The chosen core.
#define REGISTER_DIALOG(window_id)
Wrapper for REGISTER_DIALOG2.
void core_selected(window &window)
Called when another core is selected.
grid & add_page(const string_map &item)
Adds single page to the grid.
virtual void post_show(window &window) override
Inherited from modal_dialog.
bool select_row(const unsigned row, const bool select=true)
Selects a row.
const std::vector< config > & cores_
Contains the config objects for all cores.
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification_function &signal)
Connects a signal handler for getting a notification upon modification.
This file contains the settings handling of the widget library.
Various uncategorised dialogs.
void select_page(const unsigned page, const bool select=true)
Selectes a page.
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 pre_show(window &window) override
Inherited from modal_dialog.
base class of top level items, the only item which needs to store the final canvases to draw on ...