16 #define GETTEXT_DOMAIN "wesnoth-lib"
38 listbox& list = find_widget<listbox>(&
window,
"language_list",
false);
43 for(
const auto & lang : languages)
47 data[
"language"][
"label"] = lang.language;
50 if(lang == current_language) {
59 const int res = find_widget<listbox>(&
window,
"language_list",
false)
This shows the dialog to select the language to use.
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.
bool select_last_row(const bool select=true)
Does exactly as advertised: selects the list's last row.
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.
base class of top level items, the only item which needs to store the final canvases to draw on.
void keyboard_capture(widget *widget)
const language_def & get_language()
language_list get_languages(bool all)
Return a list of available translations.
REGISTER_DIALOG(tod_new_schedule)
std::map< std::string, widget_item > widget_data
@ OK
Dialog was closed with the OK button.
void set_language(const std::string &s)
void set_language(const std::string &language, const std::vector< std::string > *)