Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VoiceoverSubtitles.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
2class SCR_VoiceoverSubtitles : SCR_InfoDisplayExtended
3{
5
6 protected static float s_fLingerDuration = 0.5;
7
8 //------------------------------------------------------------------------------------------------
9 override void DisplayStartDraw(IEntity owner)
10 {
11 m_wSubtitle = RichTextWidget.Cast(m_wRoot.FindAnyWidget("Subtitle"));
12 }
13
14 //------------------------------------------------------------------------------------------------
16 static void SetLingerDuration(float duration)
17 {
18 if (duration < 0)
19 duration = 0;
20
21 s_fLingerDuration = duration;
22 }
23
24 //------------------------------------------------------------------------------------------------
25 static float GetLingerDuration()
26 {
27 return s_fLingerDuration;
28 }
29
30 //------------------------------------------------------------------------------------------------
31 void ShowSubtitle(string text)
32 {
33 if (!m_wSubtitle)
34 return;
35
36 m_wSubtitle.SetTextFormat(text);
37 Show(true);
38 }
39}
Widget m_wRoot
override void DisplayStartDraw(IEntity owner)
static void SetLingerDuration(float duration)
How long should subtitles stay visible after the sound ended (seconds).
override void Show()
Definition gameLib.c:262