diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index cd76412c8..5d37ce865 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -281,7 +281,7 @@ namespace FlaxEditor.Windows if (IsLayoutLocked) return; - _hScroll.Maximum = _output.TextSize.X; + _hScroll.Maximum = Mathf.Max(_output.TextSize.X, _hScroll.Minimum); _vScroll.Maximum = Mathf.Max(_output.TextSize.Y - _output.Height, _vScroll.Minimum); } diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs index 2db8c33e2..95b49850b 100644 --- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs +++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs @@ -1269,7 +1269,11 @@ namespace FlaxEngine.GUI // Multiline scroll if (IsMultiline && _text.Length != 0 && IsMultilineScrollable) { - TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(0, delta * 10.0f), Float2.Zero, new Float2(_targetViewOffset.X, _textSize.Y - Height)); + if (Input.GetKey(KeyboardKeys.Shift)) + TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(delta * 20.0f, 0), Float2.Zero, new Float2(_textSize.X, _targetViewOffset.Y)); + else + TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(0, delta * 10.0f), Float2.Zero, new Float2(_targetViewOffset.X, _textSize.Y - Height)); + return true; } diff --git a/Source/Engine/UI/GUI/Panels/Panel.cs b/Source/Engine/UI/GUI/Panels/Panel.cs index 61a2d2b8c..8c90b6544 100644 --- a/Source/Engine/UI/GUI/Panels/Panel.cs +++ b/Source/Engine/UI/GUI/Panels/Panel.cs @@ -292,11 +292,15 @@ namespace FlaxEngine.GUI if (base.OnMouseWheel(location, delta)) return true; + if (Input.GetKey(KeyboardKeys.Shift)) + { + if (HScrollBar != null && HScrollBar.Enabled && HScrollBar.OnMouseWheel(HScrollBar.PointFromParent(ref location), delta)) + return true; + } + // Roll back to scroll bars if (VScrollBar != null && VScrollBar.Enabled && VScrollBar.OnMouseWheel(VScrollBar.PointFromParent(ref location), delta)) return true; - if (HScrollBar != null && HScrollBar.Enabled && HScrollBar.OnMouseWheel(HScrollBar.PointFromParent(ref location), delta)) - return true; // No event handled return false;