fix: connect Background gui_input to close overlay on outside click
This commit is contained in:
@@ -176,16 +176,25 @@ func _update_hover_label() -> void:
|
||||
else:
|
||||
hover_label.text = ""
|
||||
|
||||
func _on_background_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == 1 and event.pressed:
|
||||
hide_overlay()
|
||||
close_requested.emit()
|
||||
|
||||
func _gui_input(event: InputEvent) -> void:
|
||||
print("HI")
|
||||
if not _is_visible:
|
||||
return
|
||||
|
||||
if event is InputEventMouseButton:
|
||||
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:
|
||||
hide_overlay()
|
||||
close_requested.emit()
|
||||
return
|
||||
pass
|
||||
elif event.button_index == 1 and not event.pressed:
|
||||
if _is_dragging:
|
||||
if _hovered_slot == null:
|
||||
|
||||
Reference in New Issue
Block a user