From 5b05c6ceaa2ea2d38da3c296c7f9c0ef56579e71 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 23 Aug 2021 14:38:08 +0200 Subject: [PATCH] Add scrolling timeline horizontally with Shift+Wheel #519 --- Source/Editor/GUI/Timeline/GUI/Background.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/Editor/GUI/Timeline/GUI/Background.cs b/Source/Editor/GUI/Timeline/GUI/Background.cs index 62c6b3b31..40537e377 100644 --- a/Source/Editor/GUI/Timeline/GUI/Background.cs +++ b/Source/Editor/GUI/Timeline/GUI/Background.cs @@ -236,6 +236,17 @@ namespace FlaxEditor.GUI.Timeline.GUI return true; } + // Scroll view horizontally + if (IsMouseOver && Root.GetKey(KeyboardKeys.Shift)) + { + var scroll = _timeline.MediaBackground.HScrollBar; + if (scroll.Visible && scroll.Enabled) + { + scroll.TargetValue -= delta * Timeline.UnitsPerSecond / _timeline.Zoom; + return true; + } + } + return false; }