fix: set Background to MOUSE_FILTER_PASS so clicks reach panel children

This commit is contained in:
2026-04-26 22:29:51 -07:00
parent f291f4bc25
commit b87c574b76
2 changed files with 8 additions and 2 deletions

View File

@@ -182,11 +182,17 @@ func _update_hover_label() -> void:
hover_label.text = ""
func _on_background_gui_input(event: InputEvent) -> void:
print("[OVERLAY] background clicked")
if event is InputEventMouseButton and event.button_index == 1 and event.pressed:
hide_overlay()
close_requested.emit()
func _gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == 1 and event.pressed:
var panel_rect = panel.get_global_rect()
if not panel_rect.has_point(get_global_mouse_position()):
hide_overlay()
close_requested.emit()
func _gui_input(event: InputEvent) -> void:
print("HI")
if not _is_visible:

View File

@@ -23,7 +23,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0
mouse_filter = 1
color = Color(0, 0, 0, 0.7)
[node name="InventoryPanel" type="Control" parent="." unique_id=-1294967293]