Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditableDescriptorUIInfo.c
Go to the documentation of this file.
3{
4 [Attribute(uiwidget: UIWidgets.LocaleEditBox)]
6
7 [Attribute(uiwidget: UIWidgets.LocaleEditBox)]
9
11 protected string m_sNameEncoded;
12 protected string m_sDescriptionEncoded;
13
14 //------------------------------------------------------------------------------------------------
21
22 //------------------------------------------------------------------------------------------------
26 {
27 m_sLocationName = locationName;
28 //EncodeName();
29 }
30
31 //------------------------------------------------------------------------------------------------
35 {
37 //EncodeName();
38 }
39
40 /*
41 //------------------------------------------------------------------------------------------------
42 protected void EncodeName()
43 {
44 m_sNameEncoded = SCR_LocalizationTools.EncodeFormat(m_sNameFormat, m_sLocationName);
45 m_sDescriptionEncoded = SCR_LocalizationTools.EncodeFormat(m_sDescriptionFormat, m_sLocationName);
46 }
47
48 //------------------------------------------------------------------------------------------------
49 override LocalizedString GetName()
50 {
51 if (m_sLocationName)
52 return m_sNameEncoded;
53 else
54 return super.GetName();
55 }
56
57 //------------------------------------------------------------------------------------------------
58 override LocalizedString GetDescription()
59 {
60 if (m_sLocationName)
61 return m_sDescriptionEncoded;
62 else
63 return super.GetDescription();
64 }
65 */
66
67 //------------------------------------------------------------------------------------------------
68 override bool SetNameTo(TextWidget textWidget)
69 {
70 if (!textWidget)
71 return false;
72
73 if (m_sLocationName.IsEmpty())
74 {
75 return super.SetNameTo(textWidget);
76 }
77 else
78 {
79 textWidget.SetTextFormat(m_sNameFormat, m_sLocationName);
80 return true;
81 }
82 }
83
84 //------------------------------------------------------------------------------------------------
85 override bool SetDescriptionTo(TextWidget textWidget)
86 {
87 if (!textWidget)
88 return false;
89
90 if (m_sLocationName.IsEmpty())
91 {
92 return super.SetDescriptionTo(textWidget);
93 }
94 else
95 {
96 textWidget.SetTextFormat(m_sDescriptionFormat, m_sLocationName);
97 return true;
98 }
99 }
100
101 //------------------------------------------------------------------------------------------------
102 // override without 'protected' keyword
103 override void CopyFrom(SCR_UIName source)
104 {
105 SCR_EditableDescriptorUIInfo descriptorSource = SCR_EditableDescriptorUIInfo.Cast(source);
106 if (descriptorSource)
107 {
108 m_sNameFormat = descriptorSource.m_sNameFormat;
110 }
111 else
112 {
113 m_sNameFormat = source.Name;
114
115 SCR_UIDescription descriptionSource = SCR_UIDescription.Cast(source);
116 if (descriptionSource)
117 m_sDescriptionFormat = descriptionSource.Description;
118 }
119
120 super.CopyFrom(source);
121 }
122
123 //------------------------------------------------------------------------------------------------
124 // constructor
133}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
override bool SetDescriptionTo(TextWidget textWidget)
void SetLocationName(LocalizedString locationName)
override bool SetNameTo(TextWidget textWidget)
override void CopyFrom(SCR_UIName source)
static string GetGridLabel(vector pos, int resMin=2, int resMax=4, string delimiter=" ")
LocalizedString Description
LocalizedString Name
Definition SCR_UIName.c:8
SCR_FieldOfViewSettings Attribute