Achievement percentages#545
Conversation
Fix achievement percentage list rendering
|
There's a related feature I left out of this PR because the emulator is meant to work offline. It auto-fetches global achievement unlock percentages from Steam's API on game start and writes them to achievements.json. In Steam_User_Stats constructor, if the user has explicitly set disable_lan_only=1 in [main::connectivity], networking is enabled (default) and the game has achievements, it spawns a background thread that:
By default, LAN-only mode blocks external connections, so this effectively only runs for users who have already opted into full networking. There's no dedicated setting, it piggybacks on disable_lan_only. Is it okay to add it to the PR? |
|
As I remember, the emulator's philosophy is to NEVER connect to third‑party services (especially Steam). So if this functionality is to be added, it should be fully offline, and at the same time update all current config generators (gbe_fork_tools and gen.emu.sharp). |
|
This is completely offline and optional, so if the field isn't there, it will still work as before. In the future the config generators can be updated to populate unlock_percentage values. |
|
Sorry, I didn't translate correctly and misunderstood the text of your pull request. |
| : is_achievement | ||
| ? ImVec4(0.0f, 0.0f, 0.0f, settings_noti_alpha) | ||
| : ImVec4(0, 0, 0, settings_noti_alpha)); |
There was a problem hiding this comment.
Why? if you already set to ImVec4(0, 0, 0, noti_alpha) there is no reason for this check
1. Achievement unlock percentage display — Shows an unlock percentage for each achievement (e.g. "45.2%") if the unlock_percentage field exists in your achievements.json. Rare achievements (≤10%) are highlighted in gold with a glow border on the icon.
2. Rare achievement notification effect — Golden glowing border + shimmer sweep animation on the notification popup when a rare achievement is unlocked. This is enabled if your achievements.json includes achievement percentages, as it's assumed you'll want to highlight rare achievements when that data is available.
3. Achievement list and Notification history settings — Show_Achievement_List (show/hide the list), Unlocked_Expanded (expand unlocked section by default), Locked_Expanded (expand locked section by default) and Show_Notification_History (show/hide the history).