Open cosmiccoincidence opened 7 months ago
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. 🤔
Let's see what @stilnat says on that.
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.
@cosmiccoincidence we can also ease that transition with a hard alpha 0 and adding a fade in effect in the entire canvas group.
@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.
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.
https://github.com/RE-SS3D/SS3D/assets/41941008/bdffd6c5-59fb-45aa-bf4d-fc0cf77af579