aatuh / kiigame

KiiGame Adventure Engine
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

The inventory is shuffled when dragging items #11

Closed evktalo closed 10 years ago

evktalo commented 10 years ago

Namfoodle already made note of this in 47b1883.

When an item is dragged, it is removed from the inventory and placed back when released. This causes the inventory to shuffle around whenever the items are used. Inventory shuffling isn't very good for usability I think, although this isn't really a new behaviour - this already happened when picking up items.

Previous behaviour (before the extended inventory) was that when the item was dragged, its place was left empty and "reserved" until the item was released.

Possible fix/implementation: give items their own reserved place in the inventory when picked up. When the item is dragged, the space is shown as empty & the item returns back to it when released. If an item is destroyed, resort the rest of the items according to the order they were picked up (earlier items are first in the inventory).