fix: single-click selects item and closes overlay
This commit is contained in:
@@ -101,12 +101,13 @@ func _on_slot_clicked(item_id: String) -> void:
|
||||
for child in grid.get_children():
|
||||
if child is InventorySlot and child.item_id == item_id:
|
||||
if _selected_slot == null:
|
||||
_selected_slot = child
|
||||
_drag_start_time = Time.get_ticks_msec() / 1000.0
|
||||
_is_dragging = true
|
||||
_create_drag_preview(child)
|
||||
InventoryManager.select_item(item_id)
|
||||
item_confirmed.emit(item_id)
|
||||
hide_overlay()
|
||||
elif _selected_slot.item_id == item_id:
|
||||
_handle_release_same_item()
|
||||
InventoryManager.select_item(item_id)
|
||||
item_confirmed.emit(item_id)
|
||||
hide_overlay()
|
||||
else:
|
||||
combine_requested.emit(_selected_slot.item_id, item_id)
|
||||
_clear_selection()
|
||||
|
||||
Reference in New Issue
Block a user