engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
FSubtitleManager类 参考

Subtitle manager. 更多...

#include <SubtitleManager.h>

Public 成员函数

void DisplaySubtitle (FCanvas *Canvas, FActiveSubtitle *Subtitle, FIntRect &Parms, const FLinearColor &Color)
 Draws a subtitle at the specified pixel location.
 
ENGINE_API void DisplaySubtitles (FCanvas *InCanvas, FIntRect &SubtitleRegion, float InAudioTimeSeconds)
 Display the currently queued subtitles and cleanup after they have finished rendering. 更多...
 
PTRINT FindHighestPrioritySubtitle (float CurrentTime)
 Find the highest priority subtitle from the list of currently active ones. 更多...
 
float GetCurrentSubtitlesHeight ()
 Get the height of currently rendered subtitles. 更多...
 
bool HasSubtitles ()
 Whether there are any active subtitles. 更多...
 
void KillAllSubtitles (void)
 Kill all the subtitles.
 
void KillSubtitles (PTRINT SubtitleID)
 Kill specified subtitles. 更多...
 
ENGINE_API FSubtitleManagerSetSubtitleText & OnSetSubtitleText ()
 HACK: Returns the delegate for setting subtitle text
 
void QueueSubtitles (PTRINT SubtitleID, float Priority, bool bManualWordWrap, bool bSingleLine, float SoundDuration, const TArray< FSubtitleCue > &Subtitles, float InStartTime, float InCurrentTime)
 Add an array of subtitles to the active list 更多...
 
void ENGINE_API SetMovieSubtitle (UObject *SubtitleOwner, const TArray< FString > &Subtitles)
 HACK: Accept a movie subtitle and display it to all currently registered displays. 更多...
 
void SplitLinesToSafeZone (FCanvas *Canvas, FIntRect &SubtitleRegion)
 If any of the active subtitles need to be split into multiple lines, do so now. 更多...
 
void TrimRegionToSafeZone (FCanvas *Canvas, FIntRect &InOutSubtitleRegion)
 Trim the SubtitleRegion to the safe 80% of the canvas. 更多...
 

静态 Public 成员函数

static ENGINE_API FSubtitleManager * GetSubtitleManager ()
 Get the subtitle manager singleton instance. 更多...
 

详细描述

Subtitle manager.

Handles prioritization and rendering of subtitles.

成员函数说明

◆ DisplaySubtitles()

ENGINE_API void FSubtitleManager::DisplaySubtitles ( FCanvas *  InCanvas,
FIntRect &  SubtitleRegion,
float  InAudioTimeSeconds 
)

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

参数
CanvasWhere to render the subtitles.
CurrentTimeCurrent world time.

◆ FindHighestPrioritySubtitle()

PTRINT FSubtitleManager::FindHighestPrioritySubtitle ( float  CurrentTime)

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

参数
CurrentTimeThe time at which to find the subtitle.
返回
Found subtitle identifier.

◆ GetCurrentSubtitlesHeight()

float FSubtitleManager::GetCurrentSubtitlesHeight ( )
inline

Get the height of currently rendered subtitles.

返回
Subtitle height (in pixels), or 0 if none are rendering.

◆ GetSubtitleManager()

static ENGINE_API FSubtitleManager * FSubtitleManager::GetSubtitleManager ( )
static

Get the subtitle manager singleton instance.

返回
Subtitle manager.

◆ HasSubtitles()

bool FSubtitleManager::HasSubtitles ( )
inline

Whether there are any active subtitles.

返回
true if there are any active subtitles, false otherwise.

◆ KillSubtitles()

void FSubtitleManager::KillSubtitles ( PTRINT  SubtitleID)

Kill specified subtitles.

参数
SubtitleIdIdentifier of the subtitles to kill.

◆ QueueSubtitles()

void FSubtitleManager::QueueSubtitles ( PTRINT  SubtitleID,
float  Priority,
bool  bManualWordWrap,
bool  bSingleLine,
float  SoundDuration,
const TArray< FSubtitleCue > &  Subtitles,
float  InStartTime,
float  InCurrentTime 
)

Add an array of subtitles to the active list

参数
SubTitleIDThe controlling id that groups sets of subtitles together.
PriorityUsed to prioritize subtitles; higher values have higher priority. Subtitles with a priority 0.0f are not displayed.
StartTimeTime at which the subtitles start (in seconds).
SoundDurationTime after which the subtitles do not display (in seconds).
SubtitlesCollection of lines of subtitle and time offset to play them.

◆ SetMovieSubtitle()

void ENGINE_API FSubtitleManager::SetMovieSubtitle ( UObject *  SubtitleOwner,
const TArray< FString > &  Subtitles 
)

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

This will not work with the old Canvas drawing system.

参数
SubtitleOwnerThe owner of the movie subtitle. If this is null, the subtitle will not be set
MovieSubtitlesThe subtitle text to display to all currently active displays

◆ SplitLinesToSafeZone()

void FSubtitleManager::SplitLinesToSafeZone ( FCanvas *  Canvas,
FIntRect &  SubtitleRegion 
)

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

Note: This assumes the width of the subtitle region does not change while the subtitle is active.

◆ TrimRegionToSafeZone()

void FSubtitleManager::TrimRegionToSafeZone ( FCanvas *  Canvas,
FIntRect &  InOutSubtitleRegion 
)

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

参数
CanvasThe canvas to trim to.
InOutSubtitleRegionThe trim region.

该类的文档由以下文件生成: