From 5ccd157c944a24de13975661a62e6d46a3a5bb44 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Wed, 17 Jul 2024 22:51:43 -0400 Subject: [PATCH] Re-enable Leaderboards Tab --- .../Achievements/AchievementsWindow.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp b/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp index 2e0a6cb40c5c..8605c10725b6 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp @@ -55,12 +55,12 @@ void AchievementsWindow::CreateMainLayout() m_tab_widget = new QTabWidget(); m_settings_widget = new AchievementSettingsWidget(m_tab_widget); m_progress_widget = new AchievementProgressWidget(m_tab_widget); - // m_leaderboard_widget = new AchievementLeaderboardWidget(m_tab_widget); + m_leaderboard_widget = new AchievementLeaderboardWidget(m_tab_widget); m_tab_widget->addTab(GetWrappedWidget(m_settings_widget, this, 125, 100), tr("Settings")); m_tab_widget->addTab(GetWrappedWidget(m_progress_widget, this, 125, 100), tr("Progress")); m_tab_widget->setTabVisible(1, is_game_loaded); - // m_tab_widget->addTab(GetWrappedWidget(m_leaderboard_widget, this, 125, 100), - // tr("Leaderboards")); m_tab_widget->setTabVisible(2, is_game_loaded); + m_tab_widget->addTab(GetWrappedWidget(m_leaderboard_widget, this, 125, 100), tr("Leaderboards")); + m_tab_widget->setTabVisible(2, is_game_loaded); m_button_box = new QDialogButtonBox(QDialogButtonBox::Close); @@ -84,9 +84,9 @@ void AchievementsWindow::UpdateData(AchievementManager::UpdatedItems updated_ite { m_header_widget->UpdateData(); m_progress_widget->UpdateData(true); - // m_leaderboard_widget->UpdateData(true); + m_leaderboard_widget->UpdateData(true); static_cast(m_tab_widget->widget(1))->verticalScrollBar()->setValue(0); - // static_cast(m_tab_widget->widget(2))->verticalScrollBar()->setValue(0); + static_cast(m_tab_widget->widget(2))->verticalScrollBar()->setValue(0); } else { @@ -99,10 +99,10 @@ void AchievementsWindow::UpdateData(AchievementManager::UpdatedItems updated_ite m_progress_widget->UpdateData(false); else if (updated_items.achievements.size() > 0) m_progress_widget->UpdateData(updated_items.achievements); - // if (updated_items.all_leaderboards) - // m_leaderboard_widget->UpdateData(false); - // else if (updated_items.leaderboards.size() > 0) - // m_leaderboard_widget->UpdateData(updated_items.leaderboards); + if (updated_items.all_leaderboards) + m_leaderboard_widget->UpdateData(false); + else if (updated_items.leaderboards.size() > 0) + m_leaderboard_widget->UpdateData(updated_items.leaderboards); } { @@ -111,7 +111,7 @@ void AchievementsWindow::UpdateData(AchievementManager::UpdatedItems updated_ite const bool is_game_loaded = instance.IsGameLoaded(); m_header_widget->setVisible(instance.HasAPIToken()); m_tab_widget->setTabVisible(1, is_game_loaded); - // m_tab_widget->setTabVisible(2, is_game_loaded); + m_tab_widget->setTabVisible(2, is_game_loaded); } update(); }