fix: restore mouse cursor after combining items in inventory
This commit is contained in:
@@ -273,9 +273,14 @@ func left_double_click_on_item(item_global_id: String, event: InputEvent) -> voi
|
||||
|
||||
## INVENTORY ##
|
||||
func click_on_inventory_item(item_global_id: String, event: InputEvent, action: String) -> void:
|
||||
# If we are using an inventory item reset mouse cursor
|
||||
if escoria.action_manager.action_state == ESCActionManager.ACTION_INPUT_STATE.AWAITING_TARGET_ITEM:
|
||||
Input.set_custom_mouse_cursor(null)
|
||||
|
||||
escoria.action_manager.set_current_action(action)
|
||||
var target_obj = escoria.object_manager.get_object(item_global_id).node
|
||||
|
||||
# If item needs combination with this action, use the item texture as mouse cursor
|
||||
if action in target_obj.combine_when_selected_action_is_in:
|
||||
Input.set_custom_mouse_cursor(target_obj.inventory_texture)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user