From 6d3ef113211c734e09b0e108acbb01efb285dbb6 Mon Sep 17 00:00:00 2001 From: Andre Date: Thu, 19 Mar 2026 23:10:18 +0100 Subject: [PATCH] Fix: Drag-Icon in hud.gd auf 48x48 begrenzt (Slot zu Slot) Co-Authored-By: Claude Sonnet 4.6 --- hud.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hud.gd b/hud.gd index 80802c5..94d3f58 100644 --- a/hud.gd +++ b/hud.gd @@ -141,9 +141,7 @@ func _start_actionbar_drag(slot_index: int): return drag_icon = TextureRect.new() drag_icon.texture = current_texture - drag_icon.custom_minimum_size = Vector2(40, 40) - drag_icon.size = Vector2(40, 40) - drag_icon.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL + drag_icon.expand_mode = TextureRect.EXPAND_IGNORE_SIZE drag_icon.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED drag_icon.mouse_filter = Control.MOUSE_FILTER_IGNORE var drag_layer = CanvasLayer.new() @@ -151,7 +149,10 @@ func _start_actionbar_drag(slot_index: int): drag_layer.layer = 200 drag_layer.add_child(drag_icon) get_tree().root.add_child(drag_layer) - drag_icon.position = get_viewport().get_mouse_position() - Vector2(20, 20) + # Größe erst nach add_child setzen + drag_icon.custom_minimum_size = Vector2(48, 48) + drag_icon.size = Vector2(48, 48) + drag_icon.position = get_viewport().get_mouse_position() - Vector2(24, 24) func _process(_delta): if drag_from_slot >= 0 and drag_icon: