Closed Visnicio closed 2 months ago
Hi! Can you clarify what you mean by "holding item"? Is that item equipped in an item slot?
If it's the newly created item in _on_button_pressed()
in your screenshot, you should be able to rotate it with inventory_manager.rotate_item(new_item)
.
sorry for the confusion, by "holding item" I mean the item that the player is currently dragging, I would like to be able to rotate the item while I'm dragging it in the inventory
Yeah, that is sadly not implemented in the current version. I will look into implementing something like CtrlInventoryGrid.get_grabbed_inventory_item()
or similar. Then it will be just a matter of calling InventoryGrid.rotate_item(item)
on it.
Nice, gonna wait patiently for the next update then :)
I'm using a StackGrid type inventory but I dont seem to find any method that can return me the holding item so I can pass it to
rotate_item
Theres only the
get_selected_inventory_item
in the control node but it does not return the holding item