Resume gameplay immediately after choosing Reset on the pause screen.

This commit is contained in:
Henrik Rydgård committed 2026-02-10 00:22:09 +01:00
1 parent 22dc3793c5
commit 09b087f16f
2 files changed
+7 -1

No files matched your search

+5 -1
View File
@@ -711,13 +711,17 @@ void GamePauseScreen::ShowContextMenu(UI::View *menuButton, bool portrait) {
std::string confirmMessage = GetConfirmExitMessage();
if (!confirmMessage.empty()) {
auto di = GetI18NCategory(I18NCat::DIALOG);
screenManager()->push(new UI::MessagePopupScreen(di->T("Reset"), confirmMessage, di->T("Reset"), di->T("Cancel"), [](bool result) {
screenManager()->push(new UI::MessagePopupScreen(di->T("Reset"), confirmMessage, di->T("Reset"), di->T("Cancel"), [this](bool result) {
if (result) {
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
finishNextFrameResult_ = DR_BACK; // resume
finishNextFrame_ = true;
}
}));
} else {
System_PostUIMessage(UIMessage::REQUEST_GAME_RESET);
finishNextFrameResult_ = DR_BACK; // resume
finishNextFrame_ = true;
}
});