Make inventory item viewport scrollable (fix Space Age overflow)#16
Open
olafrose wants to merge 1 commit into
Open
Make inventory item viewport scrollable (fix Space Age overflow)#16olafrose wants to merge 1 commit into
olafrose wants to merge 1 commit into
Conversation
Space Age groups contain far more items than fit in the fixed-height InventoryDialog (404x442). Previously the overflowing rows were hidden with no way to reach them, since Panel does no clipping and the recipe panel drew over the lower rows. Add a PixiJS mask over the items viewport so content clips cleanly, mouse-wheel scrolling clamped to the content bounds, and a scrollbar thumb that reflects scroll position and hides when a group fits. The scrollbar refreshes on group switch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
The
InventoryDialogis a fixed 404×442 panel. With Space Age, item groups (e.g. logistics) contain far more items than fit in the fixed height, and there was no clipping or scrolling — so the lower rows overflowed, were drawn over by the recipe panel, and could not be reached.Fix
In
packages/editor/src/UI/InventoryDialog.ts:No changes to the dialog's outer dimensions, so surrounding layout is unaffected.
Testing
npm run type-check→ 0 errors;vp lint/vp fmt --checkclean for the changed file.🤖 Generated with Claude Code