Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable inventory slot alignment #1365

Open
cosmiccoincidence opened this issue Nov 29, 2023 · 5 comments
Open

Stable inventory slot alignment #1365

cosmiccoincidence opened this issue Nov 29, 2023 · 5 comments
Labels
Bug: Confirmed Bugs that have been confirmed by another contributor. Difficulty: medium 🥼 For those that already have some understanding of the code base. UI/UX Tasks related to the User Interface/Experience

Comments

@cosmiccoincidence
Copy link
Member

cosmiccoincidence commented Nov 29, 2023

Summary

Stabilize the inventory slot locations.

Current Behavior

Currently the inventory shifts (centers itself) based on size. This results in actual slots themselves shifting which would be annoying during gameplay. The best example of this is equiping/removing your jumpsuit.

Make the inventory UI slots not shift please.

  • The hands should be centered on the screen horizontally.
  • The belt, backpack, and ID slots should be to the left of the hands.
  • Pockets should appear to the right of the hands.
Unity_PgBBUXUAO0.mp4
@cosmiccoincidence cosmiccoincidence added UI/UX Tasks related to the User Interface/Experience Difficulty: medium 🥼 For those that already have some understanding of the code base. Bug: Confirmed Bugs that have been confirmed by another contributor. labels Nov 29, 2023
@jckling
Copy link
Contributor

jckling commented Dec 11, 2023

Simple solution is to disable layout group component when remove slot, and enable when add slot.

Check HorizontalSlotOrder.Contains(container.Type) && layoutGroup.enabled in HandleInventoryContainerAdded and HandleInventoryContainerRemoved (InventoryView.cs)

Or add a parent, move the layout element component to the parent, and opreate (add/remove) in the child. 🤔

@cosmiccoincidence
Copy link
Member Author

Let's see what @stilnat says on that.

@joaoburatto
Copy link
Contributor

Yeah I agree that this solution if this is just to make it work properly. In the future the ideal way is the UI tweening to the new position or another effect. Easier said than done though.

@joaoburatto
Copy link
Contributor

@cosmiccoincidence we can also ease that transition with a hard alpha 0 and adding a fade in effect in the entire canvas group.

@stilnat
Copy link
Contributor

stilnat commented Dec 13, 2023

@jckling @cosmiccoincidence to be honest, I've no idea if jckling solution will work, but if that does, I don't see any issues with it. Worth a try.

@cosmiccoincidence cosmiccoincidence linked a pull request Dec 14, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Confirmed Bugs that have been confirmed by another contributor. Difficulty: medium 🥼 For those that already have some understanding of the code base. UI/UX Tasks related to the User Interface/Experience
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

4 participants