Commit Graph

31 Commits

Author SHA1 Message Date
Lioncash d90537cc18 AchievementManager: Return by reference from GetLock()
This makes the API a little nicer to use, since you don't need to do
a mandatory dereference when passing the lock into any kind of scope
guard.
2023-12-11 13:51:50 -05:00
Lioncash 3c7fa0738c AchievementsWindow: Add missing override specifier 2023-12-11 13:47:59 -05:00
Lioncash dbf28df64c DolphinQT: Remove unnecessary includes from achievement files
Reduces the amount of dependencies being pulled in on both local and
external headers.
2023-12-11 13:40:55 -05:00
Lioncash e55f9ed102 AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this
consistent with other instance based objects in our code.
2023-12-11 13:36:39 -05:00
LillyJadeKatrin c8d8ca2ff7 Added Disabled flag to Achievement Manager
The Disabled state sits between Game Closed and completely Shutdown - stronger than the former, as it refuses to let a game be opened again until AchievementManager is restored (which only happens upon a fresh core boot) but it isn't completely shut down and will still allow the player to be logged in and access the achievement settings and their (global) achievement header.
2023-12-05 16:17:17 -05:00
LillyJadeKatrin 2cb14edafa Add Hardcore switch to Achievement Settings dialog
This adds the actual switch to turn on Hardcore Mode to the settings tab of the Achievements dialog. It is accompanied by a large tooltip warning explaining what it does and when it can be enabled.
The switch is only enabled to be turned on when no game is running, so that games are started in hardcore mode and can only be loaded via the console's memory card, as in the original hardware. Hardcore may be turned off while a game is running, but cannot be turned back on until the game is disabled.
The toggle trigger for hardcore mode also automatically disables the settings that are not allowed during hardcore mode.
Finally, the original flag in AchievementSettingsWidget to set whether things are enabled in hardcore mode (primarily Leaderboards) is replaced with the actual Hardcore Mode setting.
2023-12-02 16:41:17 -05:00
LillyJadeKatrin 71f3039f96 Added Hardcore Warning Widget
This widget will be used in several places to notify the player that a feature has been disabled because hardcore mode is on. It includes a button to open the Achievement Settings so that Hardcore Mode may be turned off. Also included is the framework required to open AchievementsWindow specifically on the Settings tab.
2023-12-02 16:41:15 -05:00
Tilka 87c27936fc
Merge pull request #12238 from AdmiralCurtiss/achievementheaderwidget-unused-variables
DolphinQt/AchievementHeaderWidget: Remove unused member variables.
2023-11-12 21:24:17 +00:00
JosJuice aec5238aa6
Merge pull request #12237 from AdmiralCurtiss/hard-label
DolphinQt/AchievementHeaderWidget: Fix wrong label for hard unlock count.
2023-11-06 20:22:23 +01:00
Admiral H. Curtiss 3873664143
DolphinQt/AchievementProgressWidget: Use ClearLayoutRecursively() to clear layout. 2023-10-15 22:54:40 +02:00
LillyJadeKatrin b824d55093
Add Leaderboards tab to Achievement dialog
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.
2023-10-15 21:28:40 +02:00
Admiral H. Curtiss ab562553f6
DolphinQt/AchievementHeaderWidget: Remove unused member variables. 2023-10-15 18:56:28 +02:00
Admiral H. Curtiss 923fc00777
DolphinQt/AchievementHeaderWidget: Fix wrong label for hard unlock count. 2023-10-15 18:42:03 +02:00
Admiral H. Curtiss da6339a722
Merge pull request #12026 from LillyJadeKatrin/retroachievements-measured
RetroAchievements - Progress Notifications
2023-10-01 19:25:02 +02:00
LillyJadeKatrin 6b110bb6fe Added Progress switch to Achievements dialog
Added a switch for the progress messages to the settings tab of the Achievements dialog.
2023-10-01 11:24:48 -04:00
LillyJadeKatrin c8b1379113 Added error checking and logging to AchievementManager::GetAchievementProgress. 2023-10-01 10:27:57 -04:00
LillyJadeKatrin 63c407ad7c Add toggle button for badges to achievement settings
Button toggles whether badges are downloaded. When turned on, makes a call to AchievementManager to download badges.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin 80d77cfdad Added colored borders to badges in achievements dialog
The achievement badges will now have a blue or gold border to identify whether they have been unlocked in softcore or hardcore mode. Similarly, the game badge will have a blue border if all achievements have been unlocked in either mode or a gold border if all achievements have been unlocked in hardcore mode.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin ba83efded6 Added badges to achievement progress tab
Provided the badges are turned on in the settings, each achievement will have a badge next to it on the progress tab. There are different badges for locked and unlocked (usually locked is grayscale while unlocked is in color but not necessarily) and the badge chosen depends on the player's current unlock and hardcore status.
2023-09-30 23:29:02 -04:00
LillyJadeKatrin 0715da2d68 Added player and game badges to Achievements dialog header
Provided badges are turned on, if there's a player logged in their RetroAchievements icon will appear next to their player info in the header of the Achievements dialog. If they're playing a game, so will the icon for the game. Also performed some refactoring and reorganizing to the header as a whole so that it looks consistent whether a game is running or not.
2023-09-30 23:29:02 -04:00
Admiral H. Curtiss 908f90191d
Merge pull request #12204 from LillyJadeKatrin/retroachievements-bugfix
Retroachievements bugfix
2023-09-28 21:31:43 +02:00
LillyJadeKatrin 31091fc975 Added GameLoaded check to AchievementProgressWidget. 2023-09-28 00:55:58 -04:00
LillyJadeKatrin 2a9121b66f Reorganized the first-round AchievementsWindow startup to prevent items from being visible before their parents, thus getting rid of the rapid popups. 2023-09-26 23:31:04 -04:00
LillyJadeKatrin 38bd04c439 Add Rich Presence to Achievement Dialog Header
This refactors the Rich Presence generation to store to a member field that can be exposed to the UI to display the Rich Presence in the achievement header. It still updates at its original rate of once per two minutes, but calls an update on the dialog when that ticks.
2023-09-06 10:01:33 -04:00
JosJuice e7c2133160 Fixes to translatable strings 2023-08-21 16:29:52 +02:00
LillyJadeKatrin ccc9d0e5ea Synchronized Achievement Window
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.
2023-07-01 22:26:30 -04:00
LillyJadeKatrin fbaeaf305b Add UpdateCallback to AchievementManager
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.
2023-07-01 22:26:29 -04:00
LillyJadeKatrin 582042de1f Added AchievementProgressWidget to AchievementsWindow
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.
2023-07-01 22:26:29 -04:00
LillyJadeKatrin ebe77f149f Added AchievementHeaderWidget to AchievementsWindow
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).
2023-07-01 22:26:29 -04:00
LillyJadeKatrin df38573ff6
Added AchievementSettingsWidget
AchievementSettingsWidget is a dialog widget in AchievementsWindow for handling RetroAchievements settings in the user interface. This class contains the physical layout, widget connections, load/save functions and button responses. AchievementsWindow now has a tabbed list that this is inserted into; other tabs will be in a later pull request.
2023-06-02 01:53:19 +02:00
LillyJadeKatrin e1e662b86a Added AchievementsWindow QDialog
AchievementsWindow is the dialog box that will eventually contain the settings and progress data for RetroAchievements on Dolphin. This adds the barebones dialog, and connects it to MainWindow's MenuBar.
2023-06-01 18:12:20 -04:00