From db9b3592e1c21baffbc14c95ecf9272dfb2c71be Mon Sep 17 00:00:00 2001 From: NivekH Date: Sat, 20 Jul 2024 00:11:08 -0400 Subject: [PATCH] Add instructive text to disabled RetroAchievements login button Changes the RetroAchievements "Log In" button's text to "To log in, stop the current emulation." when the button is disabled because an emulation session is active. This allows a user to understand why the button is disabled, and how this state can be resolved. Previously, it could be unclear why this button was disabled without an understanding of the underlying system. Co-Authored-By: JosJuice --- .../DolphinQt/Achievements/AchievementSettingsWidget.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp index df8456318c..175d9b2f0e 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp @@ -178,6 +178,15 @@ void AchievementSettingsWidget::LoadSettings() SignalBlocking(m_common_login_button)->setVisible(logged_out); SignalBlocking(m_common_login_button) ->setEnabled(enabled && !Core::IsRunning(Core::System::GetInstance())); + if (enabled && Core::IsRunning(Core::System::GetInstance())) + { + SignalBlocking(m_common_login_button)->setText(tr("To log in, stop the current emulation.")); + } + else + { + SignalBlocking(m_common_login_button)->setText(tr("Log In")); + } + SignalBlocking(m_common_logout_button)->setVisible(!logged_out); SignalBlocking(m_common_logout_button)->setEnabled(enabled);