Smaller item cursor

This commit is contained in:
2023-10-14 16:02:11 +02:00
parent d649a7f4a8
commit 38fb731c87

View File

@@ -311,8 +311,12 @@ 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:
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)
var cursor = ImageTexture.new()
var texture_image: Image = texture.get_data()
texture_image.resize(texture_image.get_width()/2,texture_image.get_height()/2)
cursor.create_from_image(texture_image)
var middleOfTheTexture = Vector2(texture_image.get_width() / 2, texture_image.get_height() / 2)
Input.set_custom_mouse_cursor(cursor, 0, middleOfTheTexture)
escoria.action_manager.do(
escoria.action_manager.ACTION.ITEM_LEFT_CLICK,