class
FSubtitleSystem
- Module
- Narrative
- Header
#include "Narrative/SubtitleSystem.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
FSubtitleSystem() = default | FSubtitleSystem | |
~FSubtitleSystem() override | ~FSubtitleSystem | |
FSubtitleSystem(const FSubtitleSystem&) = delete | FSubtitleSystem |
Public functions
| Returns | Name | Description |
|---|---|---|
FSubtitleSystem& | operator= | |
SystemPhase | GetPhase | |
void | Initialize | |
void | Update | |
void | Shutdown | |
void | SetScene | |
void | HookDialogue | Subscribes to OnDialogueLine and installs the SoundCue caption sink. |
void | UnhookDialogue | |
bool | Queue | Returns false when the line is suppressed: subtitles off for speech, closed captions off for a sound description, or an empty line. |
bool | QueueLine | |
bool | QueueCaption | |
void | Clear | |
int32_t | GetVisibleCount | |
int32_t | GetQueuedCount | |
std::string | GetVisibleText | index 0 is the oldest visible line. |
std::string | GetVisibleSpeaker | |
float | GetVisibleRemaining | |
int32_t | GetVisiblePriority | |
void | SetNamespace | Localization namespace the keys resolve in. |
const std::string& | GetNamespace | |
std::string | Localize | |
void | SetEnabled | Player settings. |
bool | IsEnabled | |
void | SetClosedCaptions | |
bool | AreClosedCaptionsEnabled | |
void | SetShowSpeakerNames | |
bool | AreSpeakerNamesShown | |
void | SetSizeScale | |
float | GetSizeScale | |
void | SetBackgroundOpacity | |
float | GetBackgroundOpacity | |
void | SetMaxVisibleLines | |
int32_t | GetMaxVisibleLines | |
void | RefreshSettingsFromCvars | Pulls every setting from its cvar. |
TMulticastDelegate<const FSubtitleLine&>& | OnSubtitleShown | |
FSubtitleSystem* | GetActive | |
bool | ResolveHudSource |
Function details
FSubtitleSystem
C++
FSubtitleSystem() = default~FSubtitleSystem
C++
~FSubtitleSystem() overrideFSubtitleSystem
C++
FSubtitleSystem(const FSubtitleSystem&) = deleteoperator=
C++
FSubtitleSystem& operator=(const FSubtitleSystem&) = deleteGetPhase
C++
SystemPhase GetPhase() const overrideInitialize
C++
void Initialize(World* world) overrideUpdate
C++
void Update(float deltaTime) overrideShutdown
C++
void Shutdown() overrideSetScene
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() constGetQueuedCount
C++
int32_t GetQueuedCount() constGetVisibleText
C++
std::string GetVisibleText(int32_t index) constindex 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) constGetVisibleRemaining
C++
float GetVisibleRemaining(int32_t index) constGetVisiblePriority
C++
int32_t GetVisiblePriority(int32_t index) constSetNamespace
C++
void SetNamespace(const std::string& ns)Localization namespace the keys resolve in.
GetNamespace
C++
const std::string& GetNamespace() constLocalize
C++
std::string Localize(const std::string& key, const std::string& fallback) constSetEnabled
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() constSetClosedCaptions
C++
void SetClosedCaptions(bool enabled)AreClosedCaptionsEnabled
C++
bool AreClosedCaptionsEnabled() constSetShowSpeakerNames
C++
void SetShowSpeakerNames(bool show)AreSpeakerNamesShown
C++
bool AreSpeakerNamesShown() constSetSizeScale
C++
void SetSizeScale(float scale)GetSizeScale
C++
float GetSizeScale() constSetBackgroundOpacity
C++
void SetBackgroundOpacity(float opacity)GetBackgroundOpacity
C++
float GetBackgroundOpacity() constSetMaxVisibleLines
C++
void SetMaxVisibleLines(int32_t lines)GetMaxVisibleLines
C++
int32_t GetMaxVisibleLines() constRefreshSettingsFromCvars
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