From 42e5c5b41c6a60fe1c21e0edd2e1c9b70dd87e57 Mon Sep 17 00:00:00 2001 From: kobewi Date: Wed, 21 Aug 2024 10:44:45 +0200 Subject: [PATCH] Allow horizontal scrolling in Tree using Shift --- scene/gui/tree.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 46fcdcf7f6c..55ce7904f35 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3957,25 +3957,25 @@ void Tree::gui_input(const Ref &p_event) { } break; case MouseButton::WHEEL_UP: { - if (_scroll(false, -mb->get_factor() / 8)) { + if (_scroll(mb->is_shift_pressed(), -mb->get_factor() / 8)) { accept_event(); } } break; case MouseButton::WHEEL_DOWN: { - if (_scroll(false, mb->get_factor() / 8)) { + if (_scroll(mb->is_shift_pressed(), mb->get_factor() / 8)) { accept_event(); } } break; case MouseButton::WHEEL_LEFT: { - if (_scroll(true, -mb->get_factor() / 8)) { + if (_scroll(!mb->is_shift_pressed(), -mb->get_factor() / 8)) { accept_event(); } } break; case MouseButton::WHEEL_RIGHT: { - if (_scroll(true, mb->get_factor() / 8)) { + if (_scroll(!mb->is_shift_pressed(), mb->get_factor() / 8)) { accept_event(); }