Доработка. Отключить обработку ввода, если элемент не отображается

This commit is contained in:
sasha80
2023-08-23 11:54:08 +03:00
parent 8d64665451
commit 304c559284
2 changed files with 2 additions and 0 deletions

View File

@@ -159,6 +159,7 @@ func _on_drag_begin(event) -> void:
## Обработчик событий вввода. Вызывается godot
func _input(event) -> void:
if not is_visible_in_tree(): return
if event is InputEventMouseMotion:
if drag_fsm == DragFSM.DRAG:
emit_signal('drag_continue', event)

View File

@@ -192,6 +192,7 @@ func set_columns_aligment(alignments: Array) -> void:
##
func _input(event) -> void:
if not is_visible_in_tree(): return
if event is InputEventKey:
if event.pressed and in_focus:
if event.keycode == selector_key_up: