Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NotificationAproxNumber.c
Go to the documentation of this file.
1
8{
9 [Attribute(desc: "List of all aprox text that will show a specific text. It will check if the value is between the given min and max and if non valid are found will always use the last entry")]
10 protected ref array<ref SCR_NotificationAproxDisplayContainer> m_aApproxDisplayContainers;
11
12 //------------------------------------------------------------------------------------------------
14 {
15 if (m_aApproxDisplayContainers.IsEmpty())
16 {
17 Debug.Error2("SCR_NotificationAproxNumber", string.Format("Trying to display notification '%1' but no 'm_aApproxDisplayContainers' are assigned!", typename.EnumToString(ENotification, m_NotificationKey)));
18 return string.Empty;
19 }
20
21 int param1, param2, param3, param4, param5, param6;
22 data.GetParams(param1, param2, param3, param4, param5, param6);
23
24 //~ Check if the first param is already filled in. This means this is a player name from SCR_NotificationPlayerAndAproxNumber
25 LocalizedString display1;
26 data.GetNotificationTextEntries(display1);
27
29 display1 = GetAproxText(param1);
30
35 LocalizedString display6 = GetAproxText(param6);
36
37 data.SetNotificationTextEntries(display1, display2, display3, display4, display5, display6);
38 return super.GetText(data);
39 }
40
41 //------------------------------------------------------------------------------------------------
42 protected LocalizedString GetAproxText(float value)
43 {
44 for (int i = 0; i < m_aApproxDisplayContainers.Count(); i++)
45 {
47 return m_aApproxDisplayContainers[i].m_sDisplayText;
48 }
49
50 //~ Non was chosen so grab last in array
51 return m_aApproxDisplayContainers[m_aApproxDisplayContainers.Count() -1].m_sDisplayText;
52 }
53};
54
57{
58 [Attribute(desc: "Text shown in the notification at the param location", uiwidget: UIWidgets.LocaleEditBox)]
59 LocalizedString m_sDisplayText;
60
61 [Attribute(desc: "(inclusive) if nr is greater or equal than this and less than max",)]
62 float m_fMin;
63
64 [Attribute(desc: "(inclusive) if nr is smaller than this and greater or equal than min",)]
65 float m_fMax;
66};
ENotification
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_BaseEditorAttributeEntryUIInfo m_fMin
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Get all prefabs that have the spawner data
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Debug.c:13
ref array< ref SCR_NotificationAproxDisplayContainer > m_aApproxDisplayContainers
LocalizedString GetAproxText(float value)
override string GetText(SCR_NotificationData data)
static bool IsEmptyOrWhiteSpace(string input)
SCR_FieldOfViewSettings Attribute
T4 param4
Definition tuple.c:152
T3 param3
Definition tuple.c:93
T2 param2
Definition tuple.c:92
Tuple param1
T5 param5
Definition tuple.c:153