1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Allow horizontal scrolling in Tree using Shift

This commit is contained in:
kobewi
2024-08-21 10:44:45 +02:00
parent 3b3d6226c5
commit 42e5c5b41c

View File

@@ -3957,25 +3957,25 @@ void Tree::gui_input(const Ref<InputEvent> &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();
}