New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RetroAchievements - Leaderboards Tab #12027
RetroAchievements - Leaderboards Tab #12027
Conversation
3ee9286
to
1d44488
Compare
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
The rulings is a bit weird but it is what it is. I'd suggest at least making some constants for the '4', '5', and '3' values. At least 4... |
1d44488
to
74c8457
Compare
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.h
Outdated
Show resolved
Hide resolved
74c8457
to
d15ae7f
Compare
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.h
Outdated
Show resolved
Hide resolved
d15ae7f
to
c970a41
Compare
59821e2
to
aad4827
Compare
fe162dc
to
6747957
Compare
e3cc974
to
6420ad6
Compare
e9ad2f8
to
457c1b9
Compare
457c1b9
to
b32ab7f
Compare
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementLeaderboardWidget.cpp
Outdated
Show resolved
Hide resolved
9f1e474
to
a055480
Compare
Okay, UI-wise this is good enough for a prototype now, but clearly something is still wrong here somewhere (did you actually test this?), I'm not seeing the scores I would expect. Also something is causing a stack overflow in the Qt code in some instances, not sure what's going on there, I think I need to build Qt with symbols to understand that one... It's also very unresponsive while loading (probably due to holding the lock for the entire duration of the UI construction) but please don't try to solve that one as part of this PR, we should do that once everything actually works properly. |
|
Ah, I found it! You're using |
a055480
to
756c773
Compare
Okay, now for that stack overflow, how does that happen... |
756c773
to
1ad6829
Compare
Now it works, Qt did not like that you reused the layout without clearing it first. |
Genuinely didn't realize this, that is an excellent find, thank you. |
The leaderboard map created here contains information useful to displaying leaderboard stats in the Achievement dialog, including each leaderboard's name and description and a partial list of entries for display. The entire map is exposed to the UI in a single call for simplicity.
FetchBoardInfo is called (via the work queue asynchronously) on a leaderboard every time it is activated or submitted to. It makes two calls to the RetroAchievements API for fetching leaderboard info, one that requests the top four entries in the leaderboard and another that requests the player's entry, the two entries above the player and the two entries below. All of these are inserted into a single map (resolving any overlaps) so the result can be exposed to the UI.
A new tab is added to the Achievements dialog to chart out the leaderboards in a table. Each row of the table contains the leaderboard information and up to four relevant entries, varying based on how many entries are in the leaderboard, whether or not the player has a submitted score, and where in the leaderboard the player's score is.
1ad6829
to
b824d55
Compare
This is a portion of an integration with the RetroAchievements tools and libraries for connecting to the website, downloading data, unlocking achievements and submitting to leaderboards for games running in Dolphin. In this PR, I add a leaderboards tab to the Achievements dialog, and add the necessary calls to the RetroAchievements server to collect the relevant information. Each leaderboard is shown with the player's current score, if one is submitted, and a selection of other players' submissions they may find useful.