mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 17:45:23 +00:00
Fixed not counting embedded \n chars in CalculateMaxLength
This commit is contained in:
parent
ff35eefc88
commit
92f49949b6
@ -269,6 +269,7 @@ int UTypewriterTextWidget::CalculateMaxLength()
|
|||||||
for (int i = 0; i < Segments.Num(); i++)
|
for (int i = 0; i < Segments.Num(); i++)
|
||||||
{
|
{
|
||||||
const FTypewriterTextSegment& Segment = Segments[i];
|
const FTypewriterTextSegment& Segment = Segments[i];
|
||||||
|
MaxLength += Segment.Text.Len();
|
||||||
if (Segment.Text.Equals(FString(TEXT("\n"))))
|
if (Segment.Text.Equals(FString(TEXT("\n"))))
|
||||||
{
|
{
|
||||||
CurrentNumberOfLines++;
|
CurrentNumberOfLines++;
|
||||||
@ -277,10 +278,6 @@ int UTypewriterTextWidget::CalculateMaxLength()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
MaxLength += Segment.Text.Len();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return MaxLength;
|
return MaxLength;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user