Refactor Leaderboard widget to allow partial updates

Similarly to the Progress widget (though without the separate object for each box, because each Leaderboard unit is just three text fields stacked vertically), AchievementLeaderboardWidget.UpdateData will now accept three options: destroy all and rebuild, update all, or update a set of rows.

As part of this, AchievementManager::GetLeaderboardsInfo has been refactored to GetLeaderboardInfo to return a single leaderboard for the ID passed in.
This commit is contained in:
LillyJadeKatrin
2024-03-09 16:46:41 -05:00
parent d2069e888d
commit c57be0efca
5 changed files with 118 additions and 70 deletions

View File

@ -83,7 +83,7 @@ void AchievementsWindow::UpdateData()
m_settings_widget->UpdateData();
m_progress_widget->UpdateData(true);
m_tab_widget->setTabVisible(1, is_game_loaded);
m_leaderboard_widget->UpdateData();
m_leaderboard_widget->UpdateData(true);
m_tab_widget->setTabVisible(2, is_game_loaded);
}
update();