mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 17:45:23 +00:00
Added TODOs
This commit is contained in:
parent
7aac7d9d75
commit
e41fbbeb89
@ -118,9 +118,9 @@ void UTypewriterTextWidget::PlayNextLinePart(float Speed)
|
|||||||
|
|
||||||
LineText->SetText(FText());
|
LineText->SetText(FText());
|
||||||
|
|
||||||
const FString& currentLineString = RemainingLinePart;
|
CalculateWrappedString(RemainingLinePart);
|
||||||
CalculateWrappedString(currentLineString);
|
|
||||||
|
|
||||||
|
// TODO Jonas: Promote maxLines to variable. Might want maxLines = 1 for text before choices.
|
||||||
int maxLines = 3;
|
int maxLines = 3;
|
||||||
if (NumberOfLines > maxLines)
|
if (NumberOfLines > maxLines)
|
||||||
{
|
{
|
||||||
@ -129,6 +129,7 @@ void UTypewriterTextWidget::PlayNextLinePart(float Speed)
|
|||||||
for (int i = 0; i < Segments.Num(); i++)
|
for (int i = 0; i < Segments.Num(); i++)
|
||||||
{
|
{
|
||||||
const auto& segment = Segments[i];
|
const auto& segment = Segments[i];
|
||||||
|
// TODO Jonas: Mark line break segments in CalculateWrappedString instead.
|
||||||
if (segment.Text.Equals(FString(TEXT("\n"))))
|
if (segment.Text.Equals(FString(TEXT("\n"))))
|
||||||
{
|
{
|
||||||
currentLine++;
|
currentLine++;
|
||||||
@ -143,12 +144,14 @@ void UTypewriterTextWidget::PlayNextLinePart(float Speed)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int lastTerminator = currentLineString.FindLastCharByPredicate(IsSentenceTerminator, numLetters);
|
// TODO Jonas: Find lesser terminators like commas or spaces if no sentence terminator can be found.
|
||||||
|
int lastTerminator = RemainingLinePart.FindLastCharByPredicate(IsSentenceTerminator, numLetters);
|
||||||
if (lastTerminator != INDEX_NONE)
|
if (lastTerminator != INDEX_NONE)
|
||||||
{
|
{
|
||||||
int count = lastTerminator + 1;
|
int count = lastTerminator + 1;
|
||||||
const FString& shortenedString = currentLineString.Left(count);
|
const FString& shortenedString = RemainingLinePart.Left(count);
|
||||||
|
|
||||||
|
// TODO Jonas: Clean up
|
||||||
CurrentRunName = "";
|
CurrentRunName = "";
|
||||||
CurrentLetterIndex = 0;
|
CurrentLetterIndex = 0;
|
||||||
CachedLetterIndex = 0;
|
CachedLetterIndex = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user