peter-kish / gloot

A universal inventory system for the Godot game engine.
MIT License
625 stars 28 forks source link

Dragged items are off center when the scale of a `CtrlItemSlot` is not 1 #174

Closed peter-kish closed 7 months ago

peter-kish commented 8 months ago

When dragging an item from the ItemSlot the image is off centre (probably same issue as this but for item slot rather than inventory grid: (https://github.com/peter-kish/gloot/issues/160)

https://private-user-images.githubusercontent.com/49783296/307579262-c0e4880e-e354-47bb-9d23-426657978317.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkxNDQyMzksIm5iZiI6MTcwOTE0MzkzOSwicGF0aCI6Ii80OTc4MzI5Ni8zMDc1NzkyNjItYzBlNDg4MGUtZTM1NC00N2JiLTlkMjMtNDI2NjU3OTc4MzE3Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI4VDE4MTIxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRjYTgzNWU2ZGQyYzFlY2ExNjNjN2RkMzM4ZWRiZjk5MTU0MjE2ZTI4YjI5N2Y3M2ExZTY3NjFkMWJkNjg2NmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IK0oCGnRIxDD_-WcM1BGBtIWuSydT7KbmrdlYru-Xyo

It has to do with the scale of the control being less than 1.

https://github.com/peter-kish/gloot/files/14420429/item_slot_bug_test.zip

(Original issue: https://github.com/peter-kish/gloot/issues/167)

peter-kish commented 7 months ago

Should be fixed on the dev_v2.4.4 branch. Will close this issue once it has been merged.