From c5005b9024a5f2f6114b09a50b9ad5cbf3f52b65 Mon Sep 17 00:00:00 2001 From: itsMeRaj69 Date: Sun, 13 Jul 2025 21:49:21 +0530 Subject: [PATCH] Fixes more of the OM (Offline Mode) breaking codes --- launcher/LaunchController.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/launcher/LaunchController.cpp b/launcher/LaunchController.cpp index 066ec575b..82a73b05a 100644 --- a/launcher/LaunchController.cpp +++ b/launcher/LaunchController.cpp @@ -136,15 +136,24 @@ bool LaunchController::askPlayDemo() QMessageBox box(m_parentWidget); box.setWindowTitle(tr("Play demo?")); box.setText( - tr("This account does not own Minecraft.\nYou need to purchase the game first to play it.\n\nDo you want to play " - "the demo?")); + tr("This account does not own Minecraft.\n" + "You need to purchase the game first to play it.\n\n" + "Do you want to play the demo?")); box.setIcon(QMessageBox::Warning); + auto demoButton = box.addButton(tr("Play Demo"), QMessageBox::ButtonRole::YesRole); - auto cancelButton = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::NoRole); - box.setDefaultButton(cancelButton); + auto continueButton = box.addButton(tr("Continue Anyway"), QMessageBox::ButtonRole::AcceptRole); + auto cancelButton = box.addButton(tr("Cancel"), QMessageBox::ButtonRole::RejectRole); box.exec(); - return box.clickedButton() == demoButton; + + if (box.clickedButton() == demoButton) { + return true; + } else if (box.clickedButton() == continueButton) { + return true; + } else { + return false; + } } QString LaunchController::askOfflineName(QString playerName, bool demo, bool& ok)