FSubtitleManager

Subtitle manager. Handles prioritization and rendering of subtitles.

Windows
MacOS
Linux

Syntax

class FSubtitleManager

Remarks

Subtitle manager. Handles prioritization and rendering of subtitles.

Functions

Name Description

Public function

void

 

DisplaySubtitle

(
    FCanvas* Canvas,
    FActiveSubtitle* Subtitle,
    FIntRect& Parms,
    const FLinearColor& Color
)

Draws a subtitle at the specified pixel location.

Public function

void

 

DisplaySubtitles

(
    FCanvas* InCanvas,
    FIntRect& SubtitleRegion,
    float InAudioTimeSeconds
)

Display the currently queued subtitles and cleanup after they have finished rendering.

Public function

PTRINT

 

FindHighestPrioritySubtitle

(
    float CurrentTime
)

Find the highest priority subtitle from the list of currently active ones.

Public function

float

 

GetCurrentSubtitlesHeight()

Get the height of currently rendered subtitles.

Public function Static

FSubtitleMan...

 

GetSubtitleManager()

Get the subtitle manager singleton instance.

Public function

bool

 

HasSubtitles()

Whether there are any active subtitles.

Public function

void

 

KillAllSubtitles()

Kill all the subtitles.

Public function

void

 

KillSubtitles

(
    PTRINT SubtitleID
)

Kill specified subtitles.

Public function

FSubtitleMan...

 

OnSetSubtitleText()

HACK: Returns the delegate for setting subtitle text

Public function Static

void

 

QueueSubtitles

(
    const FQueueSubtitleParams& QueueS...
)

Public function

void

 

QueueSubtitles

(
    PTRINT SubtitleID,
    float Priority,
    bool bManualWordWrap,
    bool bSingleLine,
    float SoundDuration,
    const TArray< FSubtitleCue >& Subt...,
    float InStartTime,
    float InCurrentTime
)

Add an array of subtitles to the active list

Public function

void

 

SetMovieSubtitle

(
    UObject* SubtitleOwner,
    const TArray< FString >& Subtitles
)

HACK: Accept a movie subtitle and display it to all currently registered displays.

Public function

void

 

SplitLinesToSafeZone

(
    FCanvas* Canvas,
    FIntRect& SubtitleRegion
)

If any of the active subtitles need to be split into multiple lines, do so now.

Public function

void

 

TrimRegionToSafeZone

(
    FCanvas* Canvas,
    FIntRect& InOutSubtitleRegion
)

Trim the SubtitleRegion to the safe 80% of the canvas.

References

Module

Engine

Header

Runtime/Engine/Public/SubtitleManager.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback