Make TargetViewOffset only go to bottom of text. Add Scroll to Carrot for new lines.
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user