Add scrolling timeline horizontally with Shift+Wheel

#519
This commit is contained in:
Wojtek Figat
2021-08-23 14:38:08 +02:00
parent ee29a1bc91
commit 5b05c6ceaa

View File

@@ -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;
}