UI: Cleanup common message handling.

Most of it can just be handled by the common parent classes.
This commit is contained in:
Unknown W. Brackets committed 2017-12-02 11:55:06 -08:00
1 parent e945ad6ac1
commit f1bd54148b
9 files changed
+19 -79

No files matched your search

-14
View File
@@ -1032,20 +1032,6 @@ void GameSettingsScreen::update() {
}
}
void GameSettingsScreen::sendMessage(const char *message, const char *value) {
// Always call the base class method first to handle the most common messages.
UIDialogScreenWithBackground::sendMessage(message, value);
if (!strcmp(message, "control mapping") && screenManager()->topScreen() == this) {
UpdateUIState(UISTATE_MENU);
screenManager()->push(new ControlMappingScreen());
}
if (!strcmp(message, "display layout editor") && screenManager()->topScreen() == this) {
UpdateUIState(UISTATE_MENU);
screenManager()->push(new DisplayLayoutScreen());
}
}
void GameSettingsScreen::onFinish(DialogResult result) {
if (g_Config.bEnableSound) {
if (PSP_IsInited() && !IsAudioInitialised())