Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DamageStateUIInfo.c
Go to the documentation of this file.
3{
4 [Attribute("1.0 1.0 1.0 1.0", desc: "Main color of icon")]
5 protected ref Color m_Color;
6
7 [Attribute("1.0 1.0 1.0 1.0", desc: "Main color of background")]
8 protected ref Color m_BackgroundColor;
9
10 [Attribute("1.0 1.0 1.0 1.0", desc: "Main color of outline")]
11 protected ref Color m_OutlineColor;
12
13 [Attribute("1.0 1.0 1.0 1.0", desc: "Regeneration color of background")]
15
16 [Attribute("1.0 1.0 1.0 1.0", desc: "Regeneration color of outline")]
18
19 [Attribute("{B9199157B90D6216}UI/Textures/InventoryIcons/Medical/Medical-icons.imageset", params: "edds, imageset", uiwidget: UIWidgets.ResourcePickerThumbnail)]
21
22 [Attribute("Hitzone-outline_UI", desc: "Quad name of the outline image (if using an imageset")]
23 protected string m_sOutlineQuadName;
24
25 [Attribute("{B9199157B90D6216}UI/Textures/InventoryIcons/Medical/Medical-icons.imageset", params: "edds, imageset", uiwidget: UIWidgets.ResourcePickerThumbnail)]
27
28 [Attribute("Hitzone-BG_UI", desc: "Quad name of the background image (if using an imageset")]
29 protected string m_sBackgroundQuadName;
30
31 [Attribute("", desc: "Used for access of multiple icons from a single imageset")]
32 protected ref array<string> m_aIconNames;
33
34 //------------------------------------------------------------------------------------------------
38 {
39 return Color.FromInt(m_Color.PackToInt());
40 }
41
42 //------------------------------------------------------------------------------------------------
46 {
47 return Color.FromInt(m_BackgroundColor.PackToInt());
48 }
49
50 //------------------------------------------------------------------------------------------------
54 {
55 return Color.FromInt(m_OutlineColor.PackToInt());
56 }
57
58 //------------------------------------------------------------------------------------------------
62 {
63 return Color.FromInt(m_BackgroundColorRegen.PackToInt());
64 }
65
66 //------------------------------------------------------------------------------------------------
70 {
71 return Color.FromInt(m_OutlineColorRegen.PackToInt());
72 }
73
74 //------------------------------------------------------------------------------------------------
81
82 //------------------------------------------------------------------------------------------------
89
90 //------------------------------------------------------------------------------------------------
94 {
95 return m_sOutlineQuadName;
96 }
97
98 //------------------------------------------------------------------------------------------------
102 {
104 }
105
106 //------------------------------------------------------------------------------------------------
111 bool SetImageTo(ImageWidget imageWidget, ResourceName imageRes, string quadName = string.Empty)
112 {
113 if (!imageWidget)
114 return false;
115
116 string ext;
117 FilePath.StripExtension(imageRes, ext);
118 if (ext == "imageset")
119 return imageWidget.LoadImageFromSet(0, imageRes, quadName);
120 else
121 return imageWidget.LoadImageTexture(0, imageRes);
122
123 return true;
124 }
125
126 //------------------------------------------------------------------------------------------------
131 bool SetIconTo(ImageWidget imageWidget, int iconIndex)
132 {
133 if (!imageWidget || Icon.IsEmpty())
134 return false;
135
136 string ext;
137 FilePath.StripExtension(Icon, ext);
138 if (ext == "imageset")
139 imageWidget.LoadImageFromSet(0, Icon, GetIconSetName(iconIndex));
140 else
141 imageWidget.LoadImageTexture(0, GetIconPath());
142
143 return true;
144 }
145
146 //------------------------------------------------------------------------------------------------
150 string GetIconSetName(int iconIndex)
151 {
152 if (!m_aIconNames || !m_aIconNames.IsIndexValid(iconIndex))
153 return GetIconSetName();
154
155 return m_aIconNames[iconIndex];
156 }
157};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Color.c:13
bool SetImageTo(ImageWidget imageWidget, ResourceName imageRes, string quadName=string.Empty)
string GetIconSetName(int iconIndex)
bool SetIconTo(ImageWidget imageWidget, int iconIndex)
ref array< string > m_aIconNames
string GetIconSetName()
Definition SCR_UIInfo.c:65
ResourceName GetIconPath()
Definition SCR_UIInfo.c:20
ResourceName Icon
Definition SCR_UIInfo.c:10
SCR_FieldOfViewSettings Attribute