Capture arrow input on trees so UI focus doesn't skitter off randomly.

This commit is contained in:
Nolan Darilek 2019-09-25 09:12:40 -05:00
parent 1654b3729f
commit 7630fa3ec0

View File

@ -405,6 +405,8 @@ func gui_input(event):
elif node is LineEdit: elif node is LineEdit:
return check_caret_moved() return check_caret_moved()
elif node is Tree: elif node is Tree:
if event.is_action_pressed("ui_up") or event.is_action_pressed("ui_down") or event.is_action_pressed("ui_left") or event.is_action_pressed("ui_right"):
node.accept_event()
return tree_input(event) return tree_input(event)
elif node.get_class() == "EditorInspectorSection": elif node.get_class() == "EditorInspectorSection":
return editor_inspector_section_input(event) return editor_inspector_section_input(event)