Merge branch 'text-stuff' of https://github.com/Tryibion/FlaxEngine into Tryibion-text-stuff

This commit is contained in:
Wojtek Figat
2024-03-24 20:24:29 +01:00

View File

@@ -1265,7 +1265,7 @@ namespace FlaxEngine.GUI
// Multiline scroll // Multiline scroll
if (IsMultiline && _text.Length != 0 && IsMultilineScrollable) if (IsMultiline && _text.Length != 0 && IsMultilineScrollable)
{ {
TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(0, delta * 10.0f), Float2.Zero, new Float2(_targetViewOffset.X, _textSize.Y)); TargetViewOffset = Float2.Clamp(_targetViewOffset - new Float2(0, delta * 10.0f), Float2.Zero, new Float2(_targetViewOffset.X, _textSize.Y - Height));
return true; return true;
} }
@@ -1456,6 +1456,7 @@ namespace FlaxEngine.GUI
{ {
// Insert new line // Insert new line
Insert('\n'); Insert('\n');
ScrollToCaret();
} }
else if (!IsNavFocused) else if (!IsNavFocused)
{ {