fix: wire item_confirmed signal and set item cursor icon

This commit is contained in:
2026-04-26 22:35:07 -07:00
parent cec36b7aec
commit 67c91a37b0
8 changed files with 38 additions and 47 deletions

View File

@@ -193,40 +193,6 @@ func _gui_input(event: InputEvent) -> void:
hide_overlay()
close_requested.emit()
func _gui_input(event: InputEvent) -> void:
print("HI")
if not _is_visible:
return
if event is InputEventMouseButton:
print("CLOSE")
if event.button_index == 1 and event.pressed:
_clear_selection()
hide_overlay()
close_requested.emit()
if not _is_dragging:
pass
elif event.button_index == 1 and not event.pressed:
if _is_dragging:
if _hovered_slot == null:
_clear_selection()
hide_overlay()
close_requested.emit()
elif _hovered_slot == _selected_slot:
_handle_release_same_item()
else:
combine_requested.emit(_selected_slot.item_id, _hovered_slot.item_id)
_clear_selection()
return
if event is InputEventMouseMotion and _is_dragging and _dragged_item:
_dragged_item.position = get_local_mouse_position() - Vector2(24, 24)
var panel_rect = panel.get_global_rect()
if not panel_rect.has_point(get_global_mouse_position()):
_clear_selection()
hide_overlay()
close_requested.emit()
func _on_combination_attempted(item_a_id: String, item_b_id: String) -> void:
pass