From 2055b30836476f7cbdde9d94e43e451487537962 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 26 Oct 2023 22:17:45 +0200 Subject: [PATCH] Enabled the back button for some dialogs Also made one minor change to the UI mode dialog and changed the width of one dialog when running in Tate mode --- es-app/src/guis/GuiMenu.cpp | 12 +++++++----- es-app/src/guis/GuiThemeDownloader.cpp | 10 +++++----- es-app/src/views/ViewController.cpp | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index d90f04edc..8eff03a15 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -644,10 +644,12 @@ void GuiMenu::openUIOptions() msg.append("THIS WILL LIMIT THE AVAILABLE GAMES TO THE ONES\n"); msg.append("FLAGGED SUITABLE FOR CHILDREN\n"); } - msg.append("TO UNLOCK AND RETURN TO THE FULL UI, ENTER THIS CODE: \n"); - msg.append(UIModeController::getInstance()->getFormattedPassKeyStr()); + msg.append("TO UNLOCK AND RETURN TO THE FULL UI, ENTER THIS CODE: \n") + .append(UIModeController::getInstance()->getFormattedPassKeyStr()) + .append("\n\n") + .append("DO YOU WANT TO PROCEED?"); mWindow->pushGui(new GuiMsgBox( - this->getHelpStyle(), msg, "PROCEED", + this->getHelpStyle(), msg, "YES", [this, selectedMode] { LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '" << selectedMode << "'."; @@ -674,7 +676,7 @@ void GuiMenu::openUIOptions() false); mWindow->invalidateCachedBackground(); }, - "CANCEL", nullptr, "", nullptr, nullptr, true)); + "NO", nullptr, "", nullptr, nullptr, true)); } else { LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '" << selectedMode @@ -1749,7 +1751,7 @@ void GuiMenu::openUtilities() }, "CANCEL", nullptr, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? - 0.80f : + 0.76f : 0.52f * (1.778f / mRenderer->getScreenAspectRatio())))); }); s->addRow(row); diff --git a/es-app/src/guis/GuiThemeDownloader.cpp b/es-app/src/guis/GuiThemeDownloader.cpp index 8bfa6a278..efb05884c 100644 --- a/es-app/src/guis/GuiThemeDownloader.cpp +++ b/es-app/src/guis/GuiThemeDownloader.cpp @@ -724,7 +724,7 @@ void GuiThemeDownloader::populateGUI() mStatusType = StatusType::STATUS_DOWNLOADING; mStatusText = "DOWNLOADING THEME"; }, - "CANCEL", [] { return; }, "", nullptr, nullptr, true, true, + "CANCEL", [] { return; }, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? 0.75f : 0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); @@ -752,7 +752,7 @@ void GuiThemeDownloader::populateGUI() mStatusType = StatusType::STATUS_DOWNLOADING; mStatusText = "DOWNLOADING THEME"; }, - "CANCEL", [] { return; }, "", nullptr, nullptr, true, true, + "CANCEL", [] { return; }, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? 0.75f : 0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); @@ -779,7 +779,7 @@ void GuiThemeDownloader::populateGUI() mStatusType = StatusType::STATUS_DOWNLOADING; mStatusText = "DOWNLOADING THEME"; }, - "CANCEL", [] { return; }, "", nullptr, nullptr, true, true, + "CANCEL", [] { return; }, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? 0.75f : 0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); @@ -799,7 +799,7 @@ void GuiThemeDownloader::populateGUI() mStatusType = StatusType::STATUS_UPDATING; mStatusText = "UPDATING THEME"; }, - "CANCEL", [] { return; }, "", nullptr, nullptr, true, true, + "CANCEL", [] { return; }, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? 0.75f : 0.45f * (1.778f / mRenderer->getScreenAspectRatio())))); @@ -1173,7 +1173,7 @@ bool GuiThemeDownloader::input(InputConfig* config, Input input) makeInventory(); updateGUI(); }, - "CANCEL", nullptr, "", nullptr, nullptr, true, true, + "CANCEL", nullptr, "", nullptr, nullptr, false, true, (mRenderer->getIsVerticalOrientation() ? 0.70f : 0.44f * (1.778f / mRenderer->getScreenAspectRatio())))); diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 88bf5e1d7..0ef0208b0 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -279,7 +279,7 @@ void ViewController::noGamesDialog() nullptr, true)); } }, - "CANCEL", nullptr, "", nullptr, nullptr, true)); + "CANCEL", nullptr, "", nullptr, nullptr, false)); }, "QUIT", [] {