Center cursor on item combination

This commit is contained in:
2023-09-22 22:39:06 +02:00
parent 0b21813e77
commit 9705ca14a4

View File

@@ -310,7 +310,9 @@ func click_on_inventory_item(item_global_id: String, event: InputEvent, action:
# 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)
var texture = target_obj.inventory_texture
var middleOfTheTexture = Vector2(texture.get_width() / 2, texture.get_height() / 2)
Input.set_custom_mouse_cursor(target_obj.inventory_texture, 0, middleOfTheTexture)
escoria.action_manager.do(
escoria.action_manager.ACTION.ITEM_LEFT_CLICK,