diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-23 16:03:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 16:03:35 +0100 |
commit | a673e18d348ac863b2f5af1e25e557759dea56a9 (patch) | |
tree | 9a02bccbae4ef082325801a6a4264e94f93fa7a6 /scene/gui/view_panner.cpp | |
parent | c3d28ffa742298d7e00d0a08251ae97870e3ad88 (diff) | |
parent | 98692d68c3e7f3cc2a4697edfc827703b5018c36 (diff) |
Merge pull request #57080 from KoBeWi/ULTIMATER_PANNING
Diffstat (limited to 'scene/gui/view_panner.cpp')
-rw-r--r-- | scene/gui/view_panner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/view_panner.cpp b/scene/gui/view_panner.cpp index 0fbc4485ab..7476887877 100644 --- a/scene/gui/view_panner.cpp +++ b/scene/gui/view_panner.cpp @@ -53,7 +53,7 @@ bool ViewPanner::gui_input(const Ref<InputEvent> &p_event, Rect2 p_canvas_rect) panning.y += mb->get_factor() * scroll_vec.y; panning.x += mb->get_factor() * scroll_vec.x; } - callback_helper(scroll_callback, varray(panning)); + callback_helper(scroll_callback, varray(panning, mb->is_alt_pressed())); return true; } } else { @@ -66,7 +66,7 @@ bool ViewPanner::gui_input(const Ref<InputEvent> &p_event, Rect2 p_canvas_rect) panning.y += mb->get_factor() * scroll_vec.y; panning.x += mb->get_factor() * scroll_vec.x; } - callback_helper(scroll_callback, varray(panning)); + callback_helper(scroll_callback, varray(panning, mb->is_alt_pressed())); return true; } else if (!mb->is_shift_pressed()) { scroll_vec.y *= mb->get_factor(); @@ -76,7 +76,7 @@ bool ViewPanner::gui_input(const Ref<InputEvent> &p_event, Rect2 p_canvas_rect) } } - // Use Alt only for scrolling. + // Alt is not used for button presses, so ignore it. if (mb->is_alt_pressed()) { return false; } |