Receive language change message in another screen

This commit is contained in:
shenweip 2013-09-14 13:53:28 +08:00 committed by Henrik Rydgard
parent 9907f4a740
commit 42c5061e18
5 changed files with 15 additions and 1 deletions

View file

@ -212,6 +212,12 @@ void ControlMappingScreen::CreateViews() {
} }
} }
void ControlMappingScreen::sendMessage(const char *message, const char *value) {
if (!strcmp(message, "language")) {
screenManager()->RecreateAllViews();
}
}
UI::EventReturn ControlMappingScreen::OnBack(UI::EventParams &e) { UI::EventReturn ControlMappingScreen::OnBack(UI::EventParams &e) {
// If we're in-game, return to the game via DR_CANCEL. // If we're in-game, return to the game via DR_CANCEL.
if(PSP_IsInited()) { if(PSP_IsInited()) {

View file

@ -28,6 +28,7 @@ public:
ControlMappingScreen() {} ControlMappingScreen() {}
protected: protected:
virtual void CreateViews(); virtual void CreateViews();
virtual void sendMessage(const char *message, const char *value);
virtual UI::EventReturn OnBack(UI::EventParams &e); virtual UI::EventReturn OnBack(UI::EventParams &e);
private: private:

View file

@ -93,6 +93,12 @@ void CwCheatScreen::CreateViews() {
} }
} }
void CwCheatScreen::sendMessage(const char *message, const char *value) {
if (!strcmp(message, "language")) {
screenManager()->RecreateAllViews();
}
}
UI::EventReturn CwCheatScreen::OnBack(UI::EventParams &params) UI::EventReturn CwCheatScreen::OnBack(UI::EventParams &params)
{ {
screenManager()->finishDialog(this, DR_OK); screenManager()->finishDialog(this, DR_OK);

View file

@ -42,6 +42,7 @@ public:
UI::EventReturn OnEnableAll(UI::EventParams &params); UI::EventReturn OnEnableAll(UI::EventParams &params);
protected: protected:
virtual void CreateViews(); virtual void CreateViews();
virtual void sendMessage(const char *message, const char *value);
private: private:
UI::EventReturn OnCheckBox(UI::EventParams &params); UI::EventReturn OnCheckBox(UI::EventParams &params);

2
native

@ -1 +1 @@
Subproject commit 67183f5822c3e28b51bb06b754e002c737feeccf Subproject commit df8814e239531ba87a950e278f6236e85ef44b4b