diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp index a1f398cd3..77ed4a07b 100644 --- a/launcher/ui/pages/global/AccountListPage.cpp +++ b/launcher/ui/pages/global/AccountListPage.cpp @@ -137,6 +137,15 @@ void AccountListPage::listChanged() updateButtonStates(); } +void AccountListPage::showLegalNotice() +{ + QMessageBox::warning(this, tr("Notice"), + tr("Depending on the laws in your area, accessing Minecraft may require purchasing the game from Mojang." + "

" + "In order to limit dependence on nonfree network services, this Minecraft Launcher does not include DRM, " + "but its developers do not condone the violation of any law. ")); +} + void AccountListPage::on_actionAddMojang_triggered() { MinecraftAccountPtr account = @@ -152,6 +161,10 @@ void AccountListPage::on_actionAddMojang_triggered() void AccountListPage::on_actionAddAuthlibInjector_triggered() { + if (m_accounts->count() == 0) { + showLegalNotice(); + } + MinecraftAccountPtr account = AuthlibInjectorLoginDialog::newAccount( this, tr("Please enter your username (sometimes an email address), password, and the URL of your API server." "
" @@ -184,6 +197,10 @@ void AccountListPage::on_actionAddMicrosoft_triggered() void AccountListPage::on_actionAddOffline_triggered() { + if (m_accounts->count() == 0) { + showLegalNotice(); + } + MinecraftAccountPtr account = OfflineLoginDialog::newAccount(this, tr("Please enter your desired username to add your offline account.")); diff --git a/launcher/ui/pages/global/AccountListPage.h b/launcher/ui/pages/global/AccountListPage.h index 4166257c2..344b1d144 100644 --- a/launcher/ui/pages/global/AccountListPage.h +++ b/launcher/ui/pages/global/AccountListPage.h @@ -90,6 +90,7 @@ class AccountListPage : public QMainWindow, public BasePage { void ShowContextMenu(const QPoint& pos); private: + void showLegalNotice(); void changeEvent(QEvent* event) override; QMenu* createPopupMenu() override; shared_qobject_ptr m_accounts;