Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioInfoUI.c
Go to the documentation of this file.
2{
3 [Attribute(SCR_SoundEvent.SOUND_FE_TEXT_ENTERED, UIWidgets.EditBox, "")]
4 protected string m_sSoundCharEntered;
5
6 [Attribute(SCR_SoundEvent.SOUND_FE_TEXT_LEFT, UIWidgets.EditBox, "")]
7 protected string m_sSoundCharLeft;
8
9 protected string m_sCharacters;
10
11 [Attribute(defvalue: "34", uiwidget: UIWidgets.EditBox, desc: "Variable for loop frequency time")]
12 protected float LOOP_FREQUENCY;
13
14 [Attribute(defvalue: "0.1", uiwidget: UIWidgets.EditBox, desc: "variable for time needed to remove character")]
15 protected float TIME_REMOVE_CHARACTER;
16
17 protected ref array<RichTextWidget> m_wTextWidgets;
18 protected ref array<string> m_aLines;
19 protected ref array<string> m_aLinesTranslated = {};
20
21 protected float m_fAccumulatedTime;
22 protected int m_iCurrentLine;
23 protected int m_iCurrentCharacter;
24 protected int m_iCharactersCount;
25 protected int m_iLinesCount;
26 protected Widget m_wOwner;
27
29
30 //------------------------------------------------------------------------------------------------
31 override void HandlerAttached(Widget w)
32 {
33 m_wTextWidgets = {};
34 int i = 1;
35
36 RichTextWidget widgetLine = RichTextWidget.Cast(w.FindAnyWidget("m_wScenarioLine" + i.ToString()));
37 while (widgetLine)
38 {
39 m_wTextWidgets.Insert(widgetLine);
40 i++;
41 widgetLine = RichTextWidget.Cast(w.FindAnyWidget("m_wScenarioLine" + i.ToString()));
42 }
43
44 m_wOwner = w;
45 }
46
47 //------------------------------------------------------------------------------------------------
48 void Show(notnull array<string> lines, SCR_ScenarioFrameworkActionShowWidget scenarioAction)
49 {
50 m_aLines = lines;
51 m_ScenarioAction = scenarioAction;
52
53 int widgetsCount = m_wTextWidgets.Count();
54 m_iLinesCount = m_aLines.Count();
55 if (m_iLinesCount > widgetsCount)
56 m_iLinesCount = widgetsCount;
57
58 for (int i = 0; i < m_iLinesCount; i++)
59 {
60 m_wTextWidgets[i].SetVisible(!m_aLines[i].IsEmpty());
61 m_wTextWidgets[i].SetText(" ");
62 m_aLinesTranslated.Insert(WidgetManager.Translate(m_aLines[i]));
63 }
64
65 m_sCharacters = "";
68
70
72
74 }
75
76 //------------------------------------------------------------------------------------------------
78 {
79 for (int i = 0; i < m_iLinesCount; i++)
80 {
81 m_wTextWidgets[i].SetVisible(!m_aLines[i].IsEmpty());
82 m_wTextWidgets[i].SetText(m_aLines[i]);
83 }
84
86 }
87
88 //------------------------------------------------------------------------------------------------
118
119 //------------------------------------------------------------------------------------------------
129
130 //------------------------------------------------------------------------------------------------
131 protected void OnTickHideAnimation()
132 {
133 if (m_wOwner.GetOpacity() <= 0)
134 {
136 m_ScenarioAction.HideAnimationEnded();
137 return;
138 }
139
141 {
144 return;
145 }
146
148
149 m_wOwner.SetOpacity(m_wOwner.GetOpacity() -0.05);
150
152 }
153}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
static ref ScriptInvoker_GameplaySettingsSubMenuChanged m_OnLanguageChanged
static ScriptCallQueue GetCallQueuePausable()
ref array< string > m_aLines
void Show(notnull array< string > lines, SCR_ScenarioFrameworkActionShowWidget scenarioAction)
ref array< string > m_aLinesTranslated
void OnTickStartAnimation()
TODO: Security for HTML tags.
ref array< RichTextWidget > m_wTextWidgets
void OnLanguageChanged(SCR_GameplaySettingsSubMenu menu)
override void HandlerAttached(Widget w)
SCR_ScenarioFrameworkActionShowWidget m_ScenarioAction
SCR_FieldOfViewSettings Attribute
proto native bool IsEmpty()