diff options
author | bexnoss <82064510+bexnoss@users.noreply.github.com> | 2022-01-17 12:27:48 +0100 |
---|---|---|
committer | Naomi Calabretta <me@arytonex.pw> | 2022-01-30 02:42:29 +0100 |
commit | e0a04c50316089b9a443355394c5babf39a1771d (patch) | |
tree | 2db760263aa21b27097bf26a1766249d80eb0d8c /launcher/ui/pages/global/AccountListPage.cpp | |
parent | 9d23ac562f3e9ea5a20662551cd98ae0f0a1fa73 (diff) | |
download | PrismLauncher-e0a04c50316089b9a443355394c5babf39a1771d.tar.gz PrismLauncher-e0a04c50316089b9a443355394c5babf39a1771d.tar.bz2 PrismLauncher-e0a04c50316089b9a443355394c5babf39a1771d.zip |
Lock offline mode support behind insertion of at least one Minecraft account
Co-Authored-By: Naomi Calabretta <tony0000.ac@gmail.com>
Diffstat (limited to 'launcher/ui/pages/global/AccountListPage.cpp')
-rw-r--r-- | launcher/ui/pages/global/AccountListPage.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp index b9aa7628..396d320f 100644 --- a/launcher/ui/pages/global/AccountListPage.cpp +++ b/launcher/ui/pages/global/AccountListPage.cpp @@ -156,6 +156,19 @@ void AccountListPage::on_actionAddMicrosoft_triggered() void AccountListPage::on_actionAddOffline_triggered() { + if (!m_accounts->anyAccountIsValid()) { + QMessageBox::warning( + this, + tr("Error"), + tr( + "You must add a Microsoft or Mojang account that owns Minecraft before you can add an offline account." + "<br><br>" + "If you have lost your account you can contact Microsoft for support." + ) + ); + return; + } + MinecraftAccountPtr account = OfflineLoginDialog::newAccount( this, tr("Please enter your desired username to add your offline account.") |