From 652d1e5fdcfc03b78bce21d297617672f2bf4cf5 Mon Sep 17 00:00:00 2001 From: Bryce Date: Sun, 26 Apr 2026 21:54:11 -0700 Subject: [PATCH] fix: clicking outside inventory panel closes overlay --- inventory/inventory_overlay/InventoryOverlay.gd | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inventory/inventory_overlay/InventoryOverlay.gd b/inventory/inventory_overlay/InventoryOverlay.gd index 9da4584..26e2e32 100644 --- a/inventory/inventory_overlay/InventoryOverlay.gd +++ b/inventory/inventory_overlay/InventoryOverlay.gd @@ -180,10 +180,12 @@ func _gui_input(event: InputEvent) -> void: if not _is_visible: return - if event is InputEventMouseButton: + if event is InputEventMouseButton: if event.button_index == 1 and event.pressed: if not _is_dragging: - pass + hide_overlay() + close_requested.emit() + return elif event.button_index == 1 and not event.pressed: if _is_dragging: if _hovered_slot == null: