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 - Achievement Progress Tab #11878
RetroAchievements - Achievement Progress Tab #11878
Conversation
90fb313
to
cba345e
Compare
Whatever you're trying to do in the last commit, it's extremely overcomplicated. Please just do something like this instead: dolphin/Source/Core/DolphinQt/FIFO/FIFOPlayerWindow.cpp Lines 49 to 56 in d03e09c
|
This entire thing also feels like full of race conditions. How exactly are you syncing the GUI access with the backend here? Because I'm not seeing anything. |
So I gave this a try to give it a look, but apparently the progress tab is greyed out if you aren't signed in. Welp, I can't see it on my own. Screenshots please! |
The tab doesn't work when you're logged in either so uuuh |
Oh no, my apologies, I told myself I was going to provide instructions for testing and wound up forgetting by the time I got this far. The progress tab requires you to be logged in and playing a game with achievements, because it's for showing the achievements on the current game, and I have verified locally that at least in the attempts I tried, it does do this. |
3eacaff
to
d376873
Compare
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
fded3c6
to
26d0bd2
Compare
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
89a4a4e
to
ff723b0
Compare
Source/Core/DolphinQt/Achievements/AchievementProgressWidget.cpp
Outdated
Show resolved
Hide resolved
Not sure I follow what you mean about the disabled tab - what exactly is the problem? Would a good solution allow the player to click the tab but the widget then only shows "must have game loaded" or somesuch? |
Disabled tabs just aren't a thing in any modern UI. As you saw in the opening comments of this PR thread, people will just click on it and be confused why it's not switching to the tab. Yes, the tab just holding a 'no game loaded' message would be perfectly fine. As would be hiding the tab completely if it contains nothing of value. |
cf61c35
to
4437a98
Compare
Added some small methods to AchievementManager to expose useful data for displaying in an achievement UI. Also moved a couple things from private to public for the same purpose.
This widget displays a header on the AchievementsWindow dialog above the tabs that shows the currently logged in user (if there is one) and the game they are playing (if there is one).
This widget is a tab in the AchievementsWindow that displays the player's current achievement progress: which achievements are locked or unlocked, and the progress of achievements that have progress metrics.
AchievementManager now has a SetUpdateCallback method for providing a single universal callback for anytime something important changes in the achievement state, such as logging in/out, game load/close, or events such as achievement unlocks. AchievementsWindow sets this callback in its own init to its UpdateData method so that the AchievementsWindow gets updated when one of these changes takes place.
Expanded the use of the lock mutex already used for loading the player's existing unlock status to guard against races involving the Achievements dialog window reading from data AchievementManager might be in the process of updating. The lock has been exposed publicly and the AchievementsWindow uses it in its UpdateData method, and anywhere else that might modify data used to render that window has also been wrapped with it.
4437a98
to
ccc9d0e
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 an AchievementsProgressWidget and an AchievementsHeaderWidget to be added to AchievementsWindow, for the player to view data about their current progress and points.