From bd6312383549211b5123cad2194ec8fbdd5d0458 Mon Sep 17 00:00:00 2001 From: Giganzo <158825920+Giganzo@users.noreply.github.com> Date: Fri, 14 Feb 2025 16:35:44 +0100 Subject: [PATCH] Fix Tree keyboard navigation in RTL direction --- scene/gui/tree.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 81a70378786..c6f12fc2f6e 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3559,7 +3559,7 @@ void Tree::gui_input(const Ref &p_event) { Ref k = p_event; bool is_command = k.is_valid() && k->is_command_or_control_pressed(); - if (p_event->is_action("ui_right") && p_event->is_pressed()) { + if (p_event->is_action(cache.rtl ? "ui_left" : "ui_right") && p_event->is_pressed()) { if (!cursor_can_exit_tree) { accept_event(); } @@ -3577,7 +3577,7 @@ void Tree::gui_input(const Ref &p_event) { } else { _go_down(); } - } else if (p_event->is_action("ui_left") && p_event->is_pressed()) { + } else if (p_event->is_action(cache.rtl ? "ui_right" : "ui_left") && p_event->is_pressed()) { if (!cursor_can_exit_tree) { accept_event(); }