Update language immediately in UI.

This commit is contained in:
Unknown W. Brackets committed 2013-09-01 13:29:23 -07:00
1 parent 98717fee7c
commit 24ecf9416c
6 files changed
+26 -6

No files matched your search

+12 -1
View File
@@ -25,6 +25,7 @@
#include "Common/FileUtil.h"
#include "Core/System.h"
#include "Core/Host.h"
#include "Core/SaveState.h"
#include "UI/EmuScreen.h"
@@ -585,7 +586,17 @@ UI::EventReturn MainScreen::OnGameSelectedInstant(UI::EventParams &e) {
UI::EventReturn MainScreen::OnGameSettings(UI::EventParams &e) {
// screenManager()->push(new SettingsScreen());
screenManager()->push(new GameSettingsScreen("",""));
auto gameSettings = new GameSettingsScreen("", "");
gameSettings->OnLanguageChanged.Handle(this, &MainScreen::OnLanguageChange);
screenManager()->push(gameSettings);
return UI::EVENT_DONE;
}
UI::EventReturn MainScreen::OnLanguageChange(UI::EventParams &e) {
RecreateViews();
if (host) {
host->UpdateUI();
}
return UI::EVENT_DONE;
}