14 [
Attribute(defvalue:
"-1",
desc:
"Which entry should be shown when the journal is opened (0 to number of entries)",
params:
"-1 inf")]
15 protected int m_iJournalEntryToShowOnStart;
18 protected ref array<ref SCR_JournalConfig> m_aJournals;
26 if (config.GetFactionKey() == FactionKey.Empty)
29 if (config.GetFactionKey() == factionKey)
38 int GetJournalEntryToBeShown()
40 return m_iJournalEntryToShowOnStart;
48 FactionKey m_FactionKey;
51 protected ref array<ref SCR_JournalEntry> m_aEntries;
53 array<ref SCR_JournalEntry> GetEntries()
58 FactionKey GetFactionKey()
68 protected int m_iEntryID;
73 [
Attribute(
"{1AB2FA99C5CD3919}UI/layouts/Menus/DeployMenu/JournalButton.layout")]
74 protected ResourceName m_sEntryButtonLayout;
76 [
Attribute(
"Custom",
desc:
"Custom name when using SCR_EJournalEntryType.Custom")]
77 protected string m_sCustomEntryName;
80 protected string m_sEntryText;
83 protected bool m_bUseCustomLayout;
86 protected ResourceName m_sEntryLayoutCustom;
88 protected ResourceName m_sEntryLayoutDefault =
"{9BA70BE88082F251}UI/layouts/Menus/DeployMenu/JournalEntryDefault.layout";
90 protected string m_sEntryTextParam1;
91 protected Widget m_Widget;
100 string GetEntryName()
102 switch (m_eJournalEntryType)
106 return "#AR-RespawnMap_FRAGO_SituationTitle";
111 return "#AR-RespawnMap_FRAGO_MissionTitle";
116 return "#AR-RespawnMap_FRAGO_ExecutionTitle";
121 return "#AR-RespawnMap_FRAGO_SignalTitle";
126 return "#AR-RespawnMap_FRAGO_IntelTitle";
131 return m_sCustomEntryName;
139 string GetCustomEntryName()
141 return m_sCustomEntryName;
145 void SetEntryText(
string text)
151 string GetEntryText()
157 string GetEntryTextWithParam1()
159 return string.Format(m_sEntryText, m_sEntryTextParam1);
163 void SetEntryTextParam1(
string text)
165 m_sEntryTextParam1 = text;
169 string GetEntryTextParam1()
171 return m_sEntryTextParam1;
181 Widget SetEntryLayoutTo(out notnull Widget target)
183 if (m_bUseCustomLayout)
186 m_Widget =
GetGame().GetWorkspace().CreateWidgets(m_sEntryLayoutCustom, target);
188 TextWidget text = TextWidget.Cast(m_Widget.FindAnyWidget(
"Text"));
190 text.SetTextFormat(m_sEntryText, m_sEntryTextParam1);
195 m_Widget =
GetGame().GetWorkspace().CreateWidgets(m_sEntryLayoutDefault, target);
197 TextWidget text = TextWidget.Cast(m_Widget.FindAnyWidget(
"Text"));
199 text.SetTextFormat(m_sEntryText, m_sEntryTextParam1);
206 ResourceName GetEntryButtonLayout()
208 return m_sEntryButtonLayout;