kelp
kelp copied to clipboard
[feature]: Drag and Drop for inventories
Is your feature request related to a problem? Please describe With the current implementation its hard to build things that use drag and drop like a filebrowser. Because you have to manually save the last clicked itemstack.
Describe the solution you'd like Add a method to get the last itemstack that was on the cursor.
Could you please provide some more detail? What would a proper drag-and-drop implementation look like for you?
In the KelpClickEvent you can provide a DragAndDrop object which contains an action (drag or drop), the KelpItem which can be null and if dropped the target KelpItem which is simply the item clicked. This should be included so you only need to pass the DragAndDrop object to a method
The only downside of something like this is you need to cache on every InventoryClickEvent the content of the cursor