Removed the back button option from some confirmation dialogs

Also changed the button text for some dialogs to display 'Proceed/Cancel' instead of 'Yes/No'
This commit is contained in:
Leon Styhre 2023-09-10 14:09:39 +02:00
parent 7b2fd1e566
commit 68ba299e0e
8 changed files with 55 additions and 57 deletions

View file

@ -643,10 +643,9 @@ void GuiMenu::openUIOptions()
msg.append("FLAGGED SUITABLE FOR CHILDREN\n"); msg.append("FLAGGED SUITABLE FOR CHILDREN\n");
} }
msg.append("TO UNLOCK AND RETURN TO THE FULL UI, ENTER THIS CODE: \n"); msg.append("TO UNLOCK AND RETURN TO THE FULL UI, ENTER THIS CODE: \n");
msg.append(UIModeController::getInstance()->getFormattedPassKeyStr() + "\n\n"); msg.append(UIModeController::getInstance()->getFormattedPassKeyStr());
msg.append("DO YOU WANT TO PROCEED?");
mWindow->pushGui(new GuiMsgBox( mWindow->pushGui(new GuiMsgBox(
this->getHelpStyle(), msg, "YES", this->getHelpStyle(), msg, "PROCEED",
[this, selectedMode] { [this, selectedMode] {
LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '" LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '"
<< selectedMode << "'."; << selectedMode << "'.";
@ -673,7 +672,7 @@ void GuiMenu::openUIOptions()
false); false);
mWindow->invalidateCachedBackground(); mWindow->invalidateCachedBackground();
}, },
"NO", nullptr)); "CANCEL", nullptr, "", nullptr, true));
} }
else { else {
LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '" << selectedMode LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '" << selectedMode
@ -1136,27 +1135,19 @@ void GuiMenu::openConfigInput(GuiSettings* settings)
// the input device settings menu later on. // the input device settings menu later on.
settings->setNeedsSaving(false); settings->setNeedsSaving(false);
std::string message; std::string message {
if (mRenderer->getIsVerticalOrientation()) { "THE KEYBOARD AND CONTROLLERS ARE AUTOMATICALLY CONFIGURED, BUT USING THIS "
message = "THE KEYBOARD AND CONTROLLERS ARE\n" "CONFIGURATION TOOL YOU CAN OVERRIDE THE DEFAULT BUTTON MAPPINGS (THIS WILL NOT "
"AUTOMATICALLY CONFIGURED, BUT USING\n" "AFFECT THE HELP PROMPTS)"};
"THIS CONFIGURATION TOOL YOU CAN\n"
"OVERRIDE THE DEFAULT BUTTON MAPPINGS\n"
"(THIS WILL NOT AFFECT THE HELP PROMPTS)\n"
"CONTINUE?";
}
else {
message = "THE KEYBOARD AND CONTROLLERS ARE AUTOMATICALLY\n"
"CONFIGURED, BUT USING THIS CONFIGURATION TOOL\n"
"YOU CAN OVERRIDE THE DEFAULT BUTTON MAPPINGS\n"
"(THIS WILL NOT AFFECT THE HELP PROMPTS)\n"
"CONTINUE?";
}
Window* window {mWindow}; Window* window {mWindow};
window->pushGui(new GuiMsgBox( window->pushGui(new GuiMsgBox(
getHelpStyle(), message, "YES", getHelpStyle(), message, "PROCEED",
[window] { window->pushGui(new GuiDetectDevice(false, false, nullptr)); }, "NO", nullptr)); [window] { window->pushGui(new GuiDetectDevice(false, false, nullptr)); }, "CANCEL",
nullptr, "", nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ?
0.84f :
0.54f * (1.778f / mRenderer->getScreenAspectRatio()))));
} }
void GuiMenu::openOtherOptions() void GuiMenu::openOtherOptions()
@ -1655,8 +1646,8 @@ void GuiMenu::openUtilities()
"THIS WILL CREATE ALL GAME SYSTEM DIRECTORIES INSIDE YOUR ROM FOLDER AND IT WILL ALSO " "THIS WILL CREATE ALL GAME SYSTEM DIRECTORIES INSIDE YOUR ROM FOLDER AND IT WILL ALSO "
"UPDATE ALL SYSTEMINFO.TXT FILES. THIS IS A SAFE OPERATION THAT WILL NOT DELETE OR " "UPDATE ALL SYSTEMINFO.TXT FILES. THIS IS A SAFE OPERATION THAT WILL NOT DELETE OR "
"MODIFY YOUR GAME FILES. TO DECREASE APPLICATION STARTUP TIMES IT'S RECOMMENDED TO " "MODIFY YOUR GAME FILES. TO DECREASE APPLICATION STARTUP TIMES IT'S RECOMMENDED TO "
"DELETE THE SYSTEM DIRECTORIES YOU DON'T NEED AFTER RUNNING THIS UTILITY. PROCEED?", "DELETE THE SYSTEM DIRECTORIES YOU DON'T NEED AFTER RUNNING THIS UTILITY",
"YES", "PROCEED",
[this] { [this] {
if (!SystemData::createSystemDirectories()) { if (!SystemData::createSystemDirectories()) {
mWindow->pushGui(new GuiMsgBox( mWindow->pushGui(new GuiMsgBox(
@ -1687,7 +1678,7 @@ void GuiMenu::openUtilities()
0.44f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.44f * (1.778f / mRenderer->getScreenAspectRatio()))));
} }
}, },
"NO", nullptr, "", nullptr, false, true, "CANCEL", nullptr, "", nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.80f : 0.80f :
0.52f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.52f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -1706,10 +1697,9 @@ void GuiMenu::openUtilities()
row.makeAcceptInputHandler([this] { row.makeAcceptInputHandler([this] {
mWindow->pushGui(new GuiMsgBox( mWindow->pushGui(new GuiMsgBox(
getHelpStyle(), getHelpStyle(),
"THIS WILL RESCAN YOUR ROM DIRECTORY\n" "THIS WILL RESCAN YOUR ROM DIRECTORY FOR CHANGES SUCH AS ADDED OR REMOVED GAMES AND "
"FOR CHANGES SUCH AS ADDED OR REMOVED\n" "SYSTEMS",
"GAMES AND SYSTEMS, PROCEED?", "PROCEED",
"YES",
[this] { [this] {
if (CollectionSystemsManager::getInstance()->isEditing()) if (CollectionSystemsManager::getInstance()->isEditing())
CollectionSystemsManager::getInstance()->exitEditMode(); CollectionSystemsManager::getInstance()->exitEditMode();
@ -1722,7 +1712,10 @@ void GuiMenu::openUtilities()
} }
ViewController::getInstance()->rescanROMDirectory(); ViewController::getInstance()->rescanROMDirectory();
}, },
"NO", nullptr)); "CANCEL", nullptr, "", nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ?
0.80f :
0.52f * (1.778f / mRenderer->getScreenAspectRatio()))));
}); });
s->addRow(row); s->addRow(row);

View file

@ -997,7 +997,7 @@ void GuiMetaDataEd::close()
save(); save();
closeFunc(); closeFunc();
}, },
"NO", closeFunc)); "NO", closeFunc, "", nullptr, true));
} }
else { else {
// Always save if the media files have been changed (i.e. newly scraped images). // Always save if the media files have been changed (i.e. newly scraped images).

View file

@ -20,7 +20,8 @@
#include "guis/GuiScraperMulti.h" #include "guis/GuiScraperMulti.h"
GuiScraperMenu::GuiScraperMenu(std::string title) GuiScraperMenu::GuiScraperMenu(std::string title)
: mMenu {title} : mRenderer {Renderer::getInstance()}
, mMenu {title}
{ {
// Scraper service. // Scraper service.
mScraper = mScraper =
@ -144,7 +145,8 @@ GuiScraperMenu::GuiScraperMenu(std::string title)
setSize(mMenu.getSize()); setSize(mMenu.getSize());
setPosition((Renderer::getScreenWidth() - mSize.x) / 2.0f, Renderer::getScreenHeight() * 0.13f); setPosition((mRenderer->getScreenWidth() - mSize.x) / 2.0f,
mRenderer->getScreenHeight() * 0.13f);
// Make sure that the hash searching max file size is within the allowed range. // Make sure that the hash searching max file size is within the allowed range.
if (Settings::getInstance()->getInt("ScraperSearchFileHashMaxSize") < 32) if (Settings::getInstance()->getInt("ScraperSearchFileHashMaxSize") < 32)
@ -1232,19 +1234,20 @@ void GuiScraperMenu::pressedStart()
if ((*it)->getPlatformIds().empty()) { if ((*it)->getPlatformIds().empty()) {
std::string warningString; std::string warningString;
if (sys.size() == 1) { if (sys.size() == 1) {
warningString = "The selected system does not have a\n" warningString = "THE SELECTED SYSTEM DOES NOT HAVE A PLATFORM SET, RESULTS MAY BE "
"platform set, results may be inaccurate\n" "INACCURATE";
"Continue anyway?";
} }
else { else {
warningString = "At least one of your selected\n" warningString = "AT LEAST ONE OF YOUR SELECTED SYSTEMS DOES NOT HAVE A PLATFORM "
"systems does not have a platform\n" "SET, RESULTS MAY BE INACCURATE";
"set, results may be inaccurate\n"
"Continue anyway?";
} }
mWindow->pushGui(new GuiMsgBox(getHelpStyle(), Utils::String::toUpper(warningString), mWindow->pushGui(
"YES", std::bind(&GuiScraperMenu::start, this), "NO", new GuiMsgBox(getHelpStyle(), Utils::String::toUpper(warningString), "PROCEED",
nullptr)); std::bind(&GuiScraperMenu::start, this), "CANCEL", nullptr, "",
nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ?
0.80f :
0.50f * (1.778f / mRenderer->getScreenAspectRatio()))));
return; return;
} }
} }

View file

@ -57,6 +57,7 @@ private:
std::shared_ptr<OptionListComponent<SystemData*>> mSystems; std::shared_ptr<OptionListComponent<SystemData*>> mSystems;
std::shared_ptr<SliderComponent> mScraperRetryOnErrorCount; std::shared_ptr<SliderComponent> mScraperRetryOnErrorCount;
Renderer* mRenderer;
MenuComponent mMenu; MenuComponent mMenu;
}; };

View file

@ -724,7 +724,7 @@ void GuiThemeDownloader::populateGUI()
mStatusType = StatusType::STATUS_DOWNLOADING; mStatusType = StatusType::STATUS_DOWNLOADING;
mStatusText = "DOWNLOADING THEME"; mStatusText = "DOWNLOADING THEME";
}, },
"ABORT", [] { return; }, "", nullptr, true, true, "CANCEL", [] { return; }, "", nullptr, true, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.75f : 0.75f :
0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.46f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -752,7 +752,7 @@ void GuiThemeDownloader::populateGUI()
mStatusType = StatusType::STATUS_DOWNLOADING; mStatusType = StatusType::STATUS_DOWNLOADING;
mStatusText = "DOWNLOADING THEME"; mStatusText = "DOWNLOADING THEME";
}, },
"ABORT", [] { return; }, "", nullptr, true, true, "CANCEL", [] { return; }, "", nullptr, true, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.75f : 0.75f :
0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.46f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -779,7 +779,7 @@ void GuiThemeDownloader::populateGUI()
mStatusType = StatusType::STATUS_DOWNLOADING; mStatusType = StatusType::STATUS_DOWNLOADING;
mStatusText = "DOWNLOADING THEME"; mStatusText = "DOWNLOADING THEME";
}, },
"ABORT", [] { return; }, "", nullptr, true, true, "CANCEL", [] { return; }, "", nullptr, true, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.75f : 0.75f :
0.46f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.46f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -789,7 +789,7 @@ void GuiThemeDownloader::populateGUI()
getHelpStyle(), getHelpStyle(),
"THEME REPOSITORY \"" + theme.reponame + "THEME REPOSITORY \"" + theme.reponame +
"\" CONTAINS LOCAL CHANGES. PROCEED TO OVERWRITE YOUR CHANGES " "\" CONTAINS LOCAL CHANGES. PROCEED TO OVERWRITE YOUR CHANGES "
"OR ABORT TO SKIP ALL UPDATES FOR THIS THEME", "OR CANCEL TO SKIP ALL UPDATES FOR THIS THEME",
"PROCEED", "PROCEED",
[this, theme] { [this, theme] {
std::promise<bool>().swap(mPromise); std::promise<bool>().swap(mPromise);
@ -799,7 +799,7 @@ void GuiThemeDownloader::populateGUI()
mStatusType = StatusType::STATUS_UPDATING; mStatusType = StatusType::STATUS_UPDATING;
mStatusText = "UPDATING THEME"; mStatusText = "UPDATING THEME";
}, },
"ABORT", [] { return; }, "", nullptr, true, true, "CANCEL", [] { return; }, "", nullptr, true, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.75f : 0.75f :
0.45f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.45f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -1173,7 +1173,7 @@ bool GuiThemeDownloader::input(InputConfig* config, Input input)
makeInventory(); makeInventory();
updateGUI(); updateGUI();
}, },
"ABORT", nullptr, "", nullptr, true, true, "CANCEL", nullptr, "", nullptr, true, true,
(mRenderer->getIsVerticalOrientation() ? (mRenderer->getIsVerticalOrientation() ?
0.70f : 0.70f :
0.44f * (1.778f / mRenderer->getScreenAspectRatio())))); 0.44f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -1242,7 +1242,7 @@ bool GuiThemeDownloader::fetchThemesList()
mStatusText = "DOWNLOADING THEMES LIST"; mStatusText = "DOWNLOADING THEMES LIST";
return false; return false;
}, },
"ABORT", "CANCEL",
[&] { [&] {
delete this; delete this;
return false; return false;
@ -1280,7 +1280,7 @@ bool GuiThemeDownloader::fetchThemesList()
mStatusText = "DOWNLOADING THEMES LIST"; mStatusText = "DOWNLOADING THEMES LIST";
return false; return false;
}, },
"ABORT", "CANCEL",
[&] { [&] {
delete this; delete this;
return false; return false;

View file

@ -259,9 +259,8 @@ void ViewController::noGamesDialog()
"THIS WILL CREATE DIRECTORIES FOR ALL THE\n" "THIS WILL CREATE DIRECTORIES FOR ALL THE\n"
"GAME SYSTEMS DEFINED IN es_systems.xml\n\n" "GAME SYSTEMS DEFINED IN es_systems.xml\n\n"
"THIS MAY CREATE A LOT OF FOLDERS SO IT'S\n" "THIS MAY CREATE A LOT OF FOLDERS SO IT'S\n"
"ADVICED TO REMOVE THE ONES YOU DON'T NEED\n\n" "ADVICED TO REMOVE THE ONES YOU DON'T NEED",
"PROCEED?", "PROCEED",
"YES",
[this] { [this] {
if (!SystemData::createSystemDirectories()) { if (!SystemData::createSystemDirectories()) {
mWindow->pushGui(new GuiMsgBox(HelpStyle(), mWindow->pushGui(new GuiMsgBox(HelpStyle(),
@ -280,7 +279,7 @@ void ViewController::noGamesDialog()
true)); true));
} }
}, },
"NO", nullptr, "", nullptr, true)); "CANCEL", nullptr, "", nullptr, true));
}, },
"QUIT", "QUIT",
[] { [] {

View file

@ -374,7 +374,8 @@ bool GuiTextEditKeyboardPopup::input(InputConfig* config, Input input)
[this] { [this] {
delete this; delete this;
return true; return true;
})); },
"", nullptr, true));
} }
else { else {
delete this; delete this;

View file

@ -185,7 +185,8 @@ bool GuiTextEditPopup::input(InputConfig* config, Input input)
[this] { [this] {
delete this; delete this;
return true; return true;
})); },
"", nullptr, true));
} }
else { else {
delete this; delete this;