Add RetroAchievements challenge indicators - #817
Open
clintonium-119 wants to merge 2 commits into
Open
Conversation
Surface active "challenge" achievements (a primed trigger, e.g. a no-damage run in progress) both on-screen during gameplay and in the in-game menu. rcheevos already fired CHALLENGE_INDICATOR_SHOW/HIDE; these were only logged. Asset: - New ASSET_TROPHY atlas glyph (trophy cup) added to assets@1-4x.png and assets.svg, slotted next to the other small icons. White silhouette so it tints via the existing colormod path like ASSET_LOCK. On-screen indicator: - New raShowChallengeIndicators setting (default on), mirroring raShowNotifications, with a "Show Challenge Indicators" toggle in Settings. - notification.c tracks active challenges by id (idempotent show/hide, so duplicate SHOW or out-of-order HIDE are safe) and renders a trophy pill in the lower-right: a single trophy when one challenge is active, trophy + "+N" when more. Mutex-guarded to match the progress-indicator pattern; cleared on game unload via Notification_clear/quit. - ra_integration.c wires the SHOW/HIDE events to the new API (SHOW honors the setting; HIDE always fires so an indicator can't get stuck on screen). In-game menu: - Achievement list now groups by PROGRESS so the ACTIVE_CHALLENGE bucket is surfaced. Active challenges are pinned to the top (unsorted); only the remaining tail is sorted by the user's chosen order. Pinned rows get a trophy glyph before the title. Empty challenge bucket leaves the menu unchanged; challenges survive the locked-only filter.
The in-game achievement list recorded active-challenge ids into a fixed 16-entry snapshot at menu open and consulted it per row, so rows past the sixteenth lost their trophy glyph even though they still pinned to the top correctly. Every achievement pointer the list hands back already carries a live bucket field, so the snapshot, its cap, and its lookup helper are all redundant. Rows now test bucket directly.
clintonium-119
force-pushed
the
ra-challenge-indicators
branch
from
August 19, 2026 19:46
d68751e to
2124726
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Surfaces RetroAchievements challenge achievements — those with a currently primed trigger, such as a no-damage run already in progress — in two places: a trophy pill in the lower-right corner during gameplay, and pinned-to-top rows with a trophy glyph in the in-game achievement list. Adds a "Show Challenge Indicators" setting, default on, directly below "Show Notifications".
Why
rcheevos already fires
RC_CLIENT_EVENT_ACHIEVEMENT_CHALLENGE_INDICATOR_SHOWand..._HIDE, and NextUI already handles both events — by writing a debug log line that release builds compile out. The data was already arriving and being thrown away. Without an indicator there is no way for a player to tell that a challenge is armed, so a failed no-damage run is only discovered afterwards, which is precisely the feedback the challenge-indicator event exists to provide.Surfaces
+Nfor more. The lower-right corner is currently uncontested, with progress indicators rendering top-left and system indicators top-right.Notes for review
RC_CLIENT_ACHIEVEMENT_LIST_GROUPING_PROGRESS, which is what surfaces theACTIVE_CHALLENGEbucket at all. A two-pass flatten pins challenges above the sorted tail, so pinning does not disturb the player's sort setting.bucketfield rather than keeping a snapshot of active ids. The field is already live on every pointer the list hands back, so there is nothing to cache and nothing to bound.HIDEis wired unconditionally, ignoring the setting, so an indicator cannot be left stranded on screen.assets@1x.pngconfines every difference to the new trophy rect; nothing is re-laid-out and the image dimensions are unchanged.Testing
Tested on a TrimUI Brick running firmware 1.1.0, built for
tg5040. Verified: the setting appears and defaults on and survives a reboot; a started challenge draws the pill and ending it removes the pill; two or more active challenges render+Ncorrectly; launching with the setting off suppresses the pill; unloading the game clears it; the list pins challenges first with the glyph; pin order holds across sort changes and the locked-only filter; and the trophy tint matches the sibling mute and wifi-off icons. No new compiler warnings.