class

FSubtitleSystem

Module
Narrative
Header
#include "Narrative/SubtitleSystem.h"
Namespace
Mowo

Constructors

SignatureNameDescription
FSubtitleSystem() = defaultFSubtitleSystem
~FSubtitleSystem() override~FSubtitleSystem
FSubtitleSystem(const FSubtitleSystem&) = deleteFSubtitleSystem

Public functions

ReturnsNameDescription
FSubtitleSystem&operator=
SystemPhaseGetPhase
voidInitialize
voidUpdate
voidShutdown
voidSetScene
voidHookDialogueSubscribes to OnDialogueLine and installs the SoundCue caption sink.
voidUnhookDialogue
boolQueueReturns false when the line is suppressed: subtitles off for speech, closed captions off for a sound description, or an empty line.
boolQueueLine
boolQueueCaption
voidClear
int32_tGetVisibleCount
int32_tGetQueuedCount
std::stringGetVisibleTextindex 0 is the oldest visible line.
std::stringGetVisibleSpeaker
floatGetVisibleRemaining
int32_tGetVisiblePriority
voidSetNamespaceLocalization namespace the keys resolve in.
const std::string&GetNamespace
std::stringLocalize
voidSetEnabledPlayer settings.
boolIsEnabled
voidSetClosedCaptions
boolAreClosedCaptionsEnabled
voidSetShowSpeakerNames
boolAreSpeakerNamesShown
voidSetSizeScale
floatGetSizeScale
voidSetBackgroundOpacity
floatGetBackgroundOpacity
voidSetMaxVisibleLines
int32_tGetMaxVisibleLines
voidRefreshSettingsFromCvarsPulls every setting from its cvar.
TMulticastDelegate<const FSubtitleLine&>&OnSubtitleShown
FSubtitleSystem*GetActive
boolResolveHudSource

Function details

FSubtitleSystem

C++
FSubtitleSystem() = default

~FSubtitleSystem

C++
~FSubtitleSystem() override

FSubtitleSystem

C++
FSubtitleSystem(const FSubtitleSystem&) = delete

operator=

C++
FSubtitleSystem& operator=(const FSubtitleSystem&) = delete

GetPhase

C++
SystemPhase GetPhase() const override

Initialize

C++
void Initialize(World* world) override

Update

C++
void Update(float deltaTime) override

Shutdown

C++
void Shutdown() override

SetScene

C++
void SetScene(Scene* scene)

HookDialogue

C++
void HookDialogue(DialogueSystem* dialogue)

Subscribes to OnDialogueLine and installs the SoundCue caption sink. Safe to call repeatedly — a second call rebinds rather than doubling.

UnhookDialogue

C++
void UnhookDialogue()

Queue

C++
bool Queue(const FSubtitleLine& line)

Returns false when the line is suppressed: subtitles off for speech, closed captions off for a sound description, or an empty line.

QueueLine

C++
bool QueueLine(const std::string& speaker, const std::string& text, float duration, int32_t priority)

QueueCaption

C++
bool QueueCaption(const std::string& key, const std::string& text, float seconds, bool speech)

Clear

C++
void Clear()

GetVisibleCount

C++
int32_t GetVisibleCount() const

GetQueuedCount

C++
int32_t GetQueuedCount() const

GetVisibleText

C++
std::string GetVisibleText(int32_t index) const

index 0 is the oldest visible line. Resolved through localization and prefixed with the speaker when speaker names are on.

GetVisibleSpeaker

C++
std::string GetVisibleSpeaker(int32_t index) const

GetVisibleRemaining

C++
float GetVisibleRemaining(int32_t index) const

GetVisiblePriority

C++
int32_t GetVisiblePriority(int32_t index) const

SetNamespace

C++
void SetNamespace(const std::string& ns)

Localization namespace the keys resolve in.

GetNamespace

C++
const std::string& GetNamespace() const

Localize

C++
std::string Localize(const std::string& key, const std::string& fallback) const

SetEnabled

C++
void SetEnabled(bool enabled)

Player settings. Each mirrors a cvar so a change made in Project Settings ▸ Audio applies without restarting.

IsEnabled

C++
bool IsEnabled() const

SetClosedCaptions

C++
void SetClosedCaptions(bool enabled)

AreClosedCaptionsEnabled

C++
bool AreClosedCaptionsEnabled() const

SetShowSpeakerNames

C++
void SetShowSpeakerNames(bool show)

AreSpeakerNamesShown

C++
bool AreSpeakerNamesShown() const

SetSizeScale

C++
void SetSizeScale(float scale)

GetSizeScale

C++
float GetSizeScale() const

SetBackgroundOpacity

C++
void SetBackgroundOpacity(float opacity)

GetBackgroundOpacity

C++
float GetBackgroundOpacity() const

SetMaxVisibleLines

C++
void SetMaxVisibleLines(int32_t lines)

GetMaxVisibleLines

C++
int32_t GetMaxVisibleLines() const

RefreshSettingsFromCvars

C++
void RefreshSettingsFromCvars()

Pulls every setting from its cvar. Called on Initialize and whenever the settings window applies.

OnSubtitleShown

C++
TMulticastDelegate<const FSubtitleLine&>& OnSubtitleShown()

GetActive

C++
static FSubtitleSystem* GetActive()

ResolveHudSource

C++
static bool ResolveHudSource(const std::string& source, std::string& outText, double& outNumber, bool& outIsNumber)
Generated from Narrative/SubtitleSystem.h via narrative.json · Oct 26, 2026Version 1.0.0