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("TO UNLOCK AND RETURN TO THE FULL UI, ENTER THIS CODE: \n");
msg.append(UIModeController::getInstance()->getFormattedPassKeyStr() + "\n\n");
msg.append("DO YOU WANT TO PROCEED?");
msg.append(UIModeController::getInstance()->getFormattedPassKeyStr());
mWindow->pushGui(new GuiMsgBox(
this->getHelpStyle(), msg, "YES",
this->getHelpStyle(), msg, "PROCEED",
[this, selectedMode] {
LOG(LogDebug) << "GuiMenu::openUISettings(): Setting UI mode to '"
<< selectedMode << "'.";
@ -673,7 +672,7 @@ void GuiMenu::openUIOptions()
false);
mWindow->invalidateCachedBackground();
},
"NO", nullptr));
"CANCEL", nullptr, "", nullptr, true));
}
else {
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.
settings->setNeedsSaving(false);
std::string message;
if (mRenderer->getIsVerticalOrientation()) {
message = "THE KEYBOARD AND CONTROLLERS ARE\n"
"AUTOMATICALLY CONFIGURED, BUT USING\n"
"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?";
}
std::string message {
"THE KEYBOARD AND CONTROLLERS ARE AUTOMATICALLY CONFIGURED, BUT USING THIS "
"CONFIGURATION TOOL YOU CAN OVERRIDE THE DEFAULT BUTTON MAPPINGS (THIS WILL NOT "
"AFFECT THE HELP PROMPTS)"};
Window* window {mWindow};
window->pushGui(new GuiMsgBox(
getHelpStyle(), message, "YES",
[window] { window->pushGui(new GuiDetectDevice(false, false, nullptr)); }, "NO", nullptr));
getHelpStyle(), message, "PROCEED",
[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()
@ -1655,8 +1646,8 @@ void GuiMenu::openUtilities()
"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 "
"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?",
"YES",
"DELETE THE SYSTEM DIRECTORIES YOU DON'T NEED AFTER RUNNING THIS UTILITY",
"PROCEED",
[this] {
if (!SystemData::createSystemDirectories()) {
mWindow->pushGui(new GuiMsgBox(
@ -1687,7 +1678,7 @@ void GuiMenu::openUtilities()
0.44f * (1.778f / mRenderer->getScreenAspectRatio()))));
}
},
"NO", nullptr, "", nullptr, false, true,
"CANCEL", nullptr, "", nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ?
0.80f :
0.52f * (1.778f / mRenderer->getScreenAspectRatio()))));
@ -1706,10 +1697,9 @@ void GuiMenu::openUtilities()
row.makeAcceptInputHandler([this] {
mWindow->pushGui(new GuiMsgBox(
getHelpStyle(),
"THIS WILL RESCAN YOUR ROM DIRECTORY\n"
"FOR CHANGES SUCH AS ADDED OR REMOVED\n"
"GAMES AND SYSTEMS, PROCEED?",
"YES",
"THIS WILL RESCAN YOUR ROM DIRECTORY FOR CHANGES SUCH AS ADDED OR REMOVED GAMES AND "
"SYSTEMS",
"PROCEED",
[this] {
if (CollectionSystemsManager::getInstance()->isEditing())
CollectionSystemsManager::getInstance()->exitEditMode();
@ -1722,7 +1712,10 @@ void GuiMenu::openUtilities()
}
ViewController::getInstance()->rescanROMDirectory();
},
"NO", nullptr));
"CANCEL", nullptr, "", nullptr, false, true,
(mRenderer->getIsVerticalOrientation() ?
0.80f :
0.52f * (1.778f / mRenderer->getScreenAspectRatio()))));
});
s->addRow(row);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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