[Tweak] Add visualization for pause menu item cycling #3118
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.
This adds a new visualization in the pause menu to indicate when there are multiple items available for a "slot". When a slot is not being cycled, small icons to the bottom left/right will be displayed for the previous and next cycle items. When hovering over a cycle-able slot, a small A button indicator is displayed. Once cycling, the two extra item icons will animate to full size - left and right of the slot.
This has no change of behavior for the actual cycle logic. It is strictly a visual addition only. I've designed this do be usable with any inventory slot, but currently is only being used for adult/child trade slots. Eventually, after this PR and #1915 are merged, there is opportunity to also redo the trade cycle logic itself more generically.
The rendering of this is possible using the following techniques:
Basically I have one group of vertices defined for the left and right items that is centered around 0,0 (item + shadow shape), and I translate the current matrix to the center of the desired slot. This makes it so the same vertices can be reused for all possible inventory slots (and multiple slots in the same render frame!). The "actively cycling" vs "not cycling" states effect is just additional matrix transformations, so again the same vertices are used, just at a different scale and position.
This PR can either by merged before or after #1915, but ideally which ever is merged first, the other should match the changes.
Closes #2605
2023-08-13.16-16-57.mp4
Build Artifacts