Remove more uses of the ugly PromptScreen.

This commit is contained in:
Henrik Rydgård
2026-02-12 12:06:34 +01:00
parent fdfafc3e9f
commit f3c9b0cfeb
3 changed files with 10 additions and 7 deletions
+2 -1
View File
@@ -189,8 +189,9 @@ void DriverManagerScreen::CreateDriverTab(UI::ViewGroup *drivers) {
void DriverManagerScreen::OnCustomDriverChange(UI::EventParams &e) {
auto di = GetI18NCategory(I18NCat::DIALOG);
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
screenManager()->push(new PromptScreen(gamePath_, di->T("Changing this setting requires PPSSPP to restart."), di->T("Restart"), di->T("Cancel"), [=](bool yes) {
screenManager()->push(new UI::MessagePopupScreen(gr->T("Drivers"), di->T("Changing this setting requires PPSSPP to restart."), di->T("Restart"), di->T("Cancel"), [=](bool yes) {
if (yes) {
INFO_LOG(Log::G3D, "Switching driver to '%s'", e.s.c_str());
g_Config.sCustomDriver = e.s;
+1
View File
@@ -1457,6 +1457,7 @@ void EmuScreen::update() {
errLoadingFile.append("\n");
errLoadingFile.append(errorMessage_);
// Can't really use the MessagePopupScreen here because we don't have a good looking background.
screenManager()->push(new PromptScreen(gamePath_, errLoadingFile, di->T("OK"), ""));
errorMessage_.clear();
quit_ = true;
+7 -6
View File
@@ -1012,14 +1012,14 @@ MacAddressChooser::MacAddressChooser(RequesterToken token, Path gamePath, std::s
std::string_view warningMessage = n->T("ChangeMacSaveWarning", "Some games verify the MAC address when loading savedata, so this may break old saves.");
std::string combined = g_Config.sMACAddress + "\n\n" + std::string(confirmMessage) + "\n\n" + std::string(warningMessage);
auto confirmScreen = new PromptScreen(
gamePath,
auto confirmScreen = new MessagePopupScreen(
title,
combined, di->T("Yes"), di->T("No"),
[&](bool success) {
[](bool success) {
if (success) {
g_Config.sMACAddress = CreateRandMAC();
}}
);
}
});
screenManager->push(confirmScreen);
});
}
@@ -1820,8 +1820,9 @@ void GameSettingsScreen::OnRestoreDefaultSettings(UI::EventParams &e) {
if (g_Config.IsGameSpecific()) {
auto dev = GetI18NCategory(I18NCat::DEVELOPER);
auto di = GetI18NCategory(I18NCat::DIALOG);
auto sy = GetI18NCategory(I18NCat::SYSTEM);
screenManager()->push(
new PromptScreen(gamePath_, dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"),
new UI::MessagePopupScreen(sy->T("Restore Default Settings"), dev->T("RestoreGameDefaultSettings", "Are you sure you want to restore the game-specific settings back to the ppsspp defaults?\n"),
di->T("OK"), di->T("Cancel"), [this](bool yes) { CallbackRestoreDefaults(yes); }));
} else {
std::string_view title = sy->T("Restore Default Settings");