Language Selection: declared an execute function

This commit is contained in:
Charles Dang 2018-07-14 16:20:34 +11:00
parent 637e69f271
commit c0b09315d1
2 changed files with 6 additions and 3 deletions

View file

@ -916,9 +916,9 @@ bool game_launcher::play_multiplayer_commandline()
bool game_launcher::change_language()
{
gui2::dialogs::language_selection dlg;
dlg.show();
if (dlg.get_retval() != gui2::retval::OK) return false;
if(!gui2::dialogs::language_selection::execute()) {
return false;
}
if (!(cmdline_opts_.nogui || cmdline_opts_.headless_unit_test)) {
video().set_window_title(game_config::get_default_title_string());

View file

@ -28,6 +28,9 @@ public:
{
}
/** The execute function. See @ref modal_dialog for more information. */
DEFINE_SIMPLE_EXECUTE_WRAPPER(language_selection)
private:
/** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */
virtual const std::string& window_id() const override;