From e70957f907d06439cc40a8bb60da3e28a0954980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 2 Mar 2013 17:47:37 +0100 Subject: [PATCH] Android/GL UI: Allow accessing the main Settings from in-game. Note: All options may not take effect immediately. --- android/jni/MenuScreens.cpp | 13 +++++++++---- native | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/android/jni/MenuScreens.cpp b/android/jni/MenuScreens.cpp index a858667588..f937860ad3 100644 --- a/android/jni/MenuScreens.cpp +++ b/android/jni/MenuScreens.cpp @@ -196,7 +196,7 @@ void MenuScreen::render() { } if (UIButton(GEN_ID, vlinear, w, "Settings", ALIGN_RIGHT)) { - screenManager()->switchScreen(new SettingsScreen()); + screenManager()->push(new SettingsScreen(), 0); UIReset(); } @@ -273,13 +273,18 @@ void InGameMenuScreen::render() { if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Continue", ALIGN_RIGHT)) { screenManager()->finishDialog(this, DR_CANCEL); } + if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Settings", ALIGN_RIGHT)) { + screenManager()->push(new SettingsScreen(), 0); + } if (UIButton(GEN_ID, vlinear, LARGE_BUTTON_WIDTH, "Return to Menu", ALIGN_RIGHT)) { screenManager()->finishDialog(this, DR_OK); } - + + /* if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres - 10), LARGE_BUTTON_WIDTH*2, "Debug: Dump Next Frame", ALIGN_BOTTOMRIGHT)) { gpu->DumpNextFrame(); } + */ DrawWatermark(); UIEnd(); @@ -291,7 +296,7 @@ void InGameMenuScreen::render() { void SettingsScreen::update(InputState &input) { if (input.pad_buttons_down & PAD_BUTTON_BACK) { g_Config.Save(); - screenManager()->switchScreen(new MenuScreen()); + screenManager()->finishDialog(this, DR_OK); } } @@ -331,7 +336,7 @@ void SettingsScreen::render() { // UICheckBox(GEN_ID, x, y += stride, "Draw raw framebuffer (for some homebrew)", ALIGN_TOPLEFT, &g_Config.bDisplayFramebuffer); if (UIButton(GEN_ID, Pos(dp_xres - 10, dp_yres-10), LARGE_BUTTON_WIDTH, "Back", ALIGN_RIGHT | ALIGN_BOTTOM)) { - screenManager()->switchScreen(new MenuScreen()); + screenManager()->finishDialog(this, DR_OK); } UIEnd(); diff --git a/native b/native index 3f6353af5a..3c1566b9a7 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 3f6353af5afe1542a50c33eb0bb554ea25653258 +Subproject commit 3c1566b9a7559708dfd7d1413f723da51299e5c4