A text block that exposes more information about text layout.
More...
#include <VisualTextBlock.h>
|
| UVisualTextBlock (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get()) |
|
void | Typewrite () |
| Applies typewriter effect to the current text of the text block.
|
|
void | Pause () |
| Pauses active typewriter effect.
|
|
void | Resume () |
| Resumes active typewriter effect.
|
|
FORCEINLINE bool | HasTypewriterFinished () const |
|
void | ForceTypewriteToEnd () |
| Unconditionally stops typewriter effect.
|
|
|
float | LetterPlayTime |
| The amount of time, in seconds, between printing individual letters.
|
|
float | EndHoldTime |
| The amount of time, in seconds, to wait after finishing the line before actually marking it completed.
|
|
|
void | OnPlayLetter () |
| Called when individual letter is typed by typewriter.
|
|
void | OnTypewriterFinished () |
| Called when typewriter effect is finished.
|
|
virtual TSharedRef< SWidget > | RebuildWidget () override |
|
|
TSharedPtr< FSlateTextLayout > | TextLayout |
| Text layout of this text block.
|
|
TSharedPtr< FRichTextLayoutMarshaller > | TextMarshaller |
| Text marshaller for the text layout.
|
|
FText | CurrentLine |
| Currently typed text.
|
|
TArray< FDialogueTextSegment > | Segments |
| Processed dialog text segments.
|
|
FString | CachedSegmentText |
| The section of the text that's already been printed out and won't ever change.
|
|
int32 | CachedLetterIndex |
| Index of last letter that already been printed out and won't ever change.
|
|
int32 | CurrentSegmentIndex |
| Current position of a segment.
|
|
int32 | CurrentLetterIndex |
| Current position of a letter.
|
|
int32 | MaxLetterIndex |
| Most reachable position for a letter.
|
|
uint32 | bHasFinishedPlaying: 1 |
| State of the typewriter effect.
|
|
FTimerHandle | LetterTimer |
| Timer used to play letters as in typewriter.
|
|
A text block that exposes more information about text layout.
Supports break tag that pauses typewriter when it is encountered in text.
- See also
- FBreakVisualTextBlockDecorator
◆ CalculateSegments()
FString UVisualTextBlock::CalculateSegments |
( |
| ) |
|
|
private |
- Returns
- parsed dialogue segments as string
◆ HasTypewriterFinished()
FORCEINLINE bool UVisualTextBlock::HasTypewriterFinished |
( |
| ) |
const |
|
inline |
◆ OnTypewriterFinished()
void UVisualTextBlock::OnTypewriterFinished |
( |
| ) |
|
|
protected |
Called when typewriter effect is finished.
- Note
- pausing typewriter will not trigger this event
◆ Pause()
void UVisualTextBlock::Pause |
( |
| ) |
|
Pauses active typewriter effect.
- Note
- not threadsafe, has no effect for inactive timer.
◆ RebuildWidget()
TSharedRef< SWidget > UVisualTextBlock::RebuildWidget |
( |
| ) |
|
|
overrideprotectedvirtual |
- Returns
- underlying slate widget
◆ Resume()
void UVisualTextBlock::Resume |
( |
| ) |
|
Resumes active typewriter effect.
- Note
- not threadsafe, has no effect for active timer.
◆ CachedSegmentText
FString UVisualTextBlock::CachedSegmentText |
|
private |
The section of the text that's already been printed out and won't ever change.
This lets us cache some of the work we've already done. We can't cache absolutely everything as the last few characters of a string may change if they're related to a named run that hasn't been completed yet.
◆ EndHoldTime
float UVisualTextBlock::EndHoldTime |
The amount of time, in seconds, to wait after finishing the line before actually marking it completed.
This helps prevent accidentally progressing dialogue on short lines.
◆ LetterPlayTime
float UVisualTextBlock::LetterPlayTime |
The amount of time, in seconds, between printing individual letters.
during for the typewriter effect. Zero means no typewriter effect.
The documentation for this class was generated from the following files:
- VisualTextBlock.h
- VisualTextBlock.cpp