Problems:
1) It looks like you can't deselect an object in your inventory once you clicked on it.
2) You need 3 slots to swap 2 items and if your inventory is full you have to drop a third object, swap the two using the empty slot as support and then pick the object up again.
I don't know if there is something in the code that makes it complex to implement, but it would be very useful to have a click-again-to-deselect functionality and to have a "swap" button.
1) It looks like you can't deselect an object in your inventory once you clicked on it.
2) You need 3 slots to swap 2 items and if your inventory is full you have to drop a third object, swap the two using the empty slot as support and then pick the object up again.
I don't know if there is something in the code that makes it complex to implement, but it would be very useful to have a click-again-to-deselect functionality and to have a "swap" button.