add "onFinish" to screens so that ESC (etc) works the same as the back

touch button.
This commit is contained in:
Henrik Rydgård committed 2013-10-25 13:19:08 +02:00
1 parent b896a29ec0
commit 4590e44954
12 files changed
+40 -49

No files matched your search

+8 -2
View File
@@ -225,9 +225,11 @@ void TouchControlLayoutScreen::touch(const TouchInput &touch) {
}
};
UI::EventReturn TouchControlLayoutScreen::OnBack(UI::EventParams &e) {
g_Config.Save();
UI::EventReturn TouchControlLayoutScreen::OnBack(UI::EventParams &e) {
// Hm, wtf?
if (PSP_IsInited()) {
screenManager()->finishDialog(this, DR_CANCEL);
} else {
@@ -237,6 +239,10 @@ UI::EventReturn TouchControlLayoutScreen::OnBack(UI::EventParams &e) {
return UI::EVENT_DONE;
};
void TouchControlLayoutScreen::onFinish(DialogResult reason) {
g_Config.Save();
}
UI::EventReturn TouchControlLayoutScreen::OnVisibility(UI::EventParams &e) {
screenManager()->push(new TouchControlVisibilityScreen());
return UI::EVENT_DONE;