VisualU 1.2.1
Plugin for Unreal Engine 5 that brings core functionality for a widget-based visual novel game
 
Loading...
Searching...
No Matches
FBreakVisualTextBlockDecorator Class Reference

Pauses typewriter when it hits break tag - <b/>. More...

#include <BreakVisualTextBlockDecorator.h>

Inheritance diagram for FBreakVisualTextBlockDecorator:

Public Member Functions

 FBreakVisualTextBlockDecorator (UVisualTextBlock *InOwner)
 
virtual bool Supports (const FTextRunParseResults &RunParseResult, const FString &Text) const override
 Determines the tag that is supported by this decorator.
 

Protected Member Functions

virtual void CreateDecoratorText (const FTextRunInfo &RunInfo, FTextBlockStyle &InOutTextStyle, FString &InOutString) const override
 Produces decorated result.
 

Private Types

typedef FRichTextDecorator Super
 

Private Member Functions

 FBreakVisualTextBlockDecorator (URichTextBlock *InOwner)
 Parent constructor is hidden because we want to construct only from UVisualTextBlock.
 

Private Attributes

FTimerHandle BreakTimer
 Timer to pause typewriter.
 
int32 TagPosition
 Position of the break tag in the text.
 
uint32 bTagDiscovered: 1
 Determines if at least one break tag were found.
 

Detailed Description

Pauses typewriter when it hits break tag - <b/>.

Understands

*text*<b>*text*</> and *text*<b/>*text*.

Only one tag per text is supported at this time.

Note
Only the last found break tag in the text will have an effect.

Member Function Documentation

◆ CreateDecoratorText()

void FBreakVisualTextBlockDecorator::CreateDecoratorText ( const FTextRunInfo & RunInfo,
FTextBlockStyle & InOutTextStyle,
FString & InOutString ) const
overrideprotectedvirtual

Produces decorated result.

Responsible for pausing typewriter, leaves provided text style intact.

Parameters
RunInfocontains data about parsed tag and its metadata
InOutTextStyletext style to be decorated. Left as provided.
InOutStringtext to be modified. Left as provided.

◆ Supports()

bool FBreakVisualTextBlockDecorator::Supports ( const FTextRunParseResults & RunParseResult,
const FString & Text ) const
overridevirtual

Determines the tag that is supported by this decorator.

Parameters
RunParseResultcontains data about parsed tags and its metadata
TextContent of Rich text block that has this decorator

The documentation for this class was generated from the following files: