Merge branch 'better-material-source-window' of https://github.com/Tryibion/FlaxEngine into Tryibion-better-material-source-window

This commit is contained in:
Wojtek Figat
2022-11-21 16:07:52 +01:00
2 changed files with 28 additions and 7 deletions

View File

@@ -229,6 +229,11 @@ namespace FlaxEngine.GUI
[EditorOrder(529)]
public bool ClipText { get; set; } = true;
/// <summary>
/// Gets or sets a value indicating whether you can scroll the text in the text box
/// </summary>
public bool CanScrollMultilineText { get; set; } = true;
/// <summary>
/// Gets or sets textbox background color when the control is selected (has focus).
/// </summary>
@@ -1157,7 +1162,7 @@ namespace FlaxEngine.GUI
return true;
// Multiline scroll
if (IsMultiline && _text.Length != 0)
if (IsMultiline && _text.Length != 0 && CanScrollMultilineText)
{
TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(0, delta * 10.0f), Float2.Zero, new Float2(_targetViewOffset.X, _textSize.Y));
return true;