Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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")]
14  protected ref Color m_BackgroundColorRegen;
15 
16  [Attribute("1.0 1.0 1.0 1.0", desc: "Regeneration color of outline")]
17  protected ref Color m_OutlineColorRegen;
18 
19  [Attribute("{B9199157B90D6216}UI/Textures/InventoryIcons/Medical/Medical-icons.imageset", params: "edds, imageset", uiwidget: UIWidgets.ResourcePickerThumbnail)]
20  protected ResourceName m_sOutlineImage;
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)]
26  protected ResourceName m_sBackgroundImage;
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  //------------------------------------------------------------------------------------------------
37  Color GetColor()
38  {
39  return Color.FromInt(m_Color.PackToInt());
40  }
41 
42  //------------------------------------------------------------------------------------------------
45  Color GetBackgroundColor()
46  {
47  return Color.FromInt(m_BackgroundColor.PackToInt());
48  }
49 
50  //------------------------------------------------------------------------------------------------
53  Color GetOutlineColor()
54  {
55  return Color.FromInt(m_OutlineColor.PackToInt());
56  }
57 
58  //------------------------------------------------------------------------------------------------
61  Color GetBackgroundColorRegen()
62  {
63  return Color.FromInt(m_BackgroundColorRegen.PackToInt());
64  }
65 
66  //------------------------------------------------------------------------------------------------
69  Color GetOutlineColorRegen()
70  {
71  return Color.FromInt(m_OutlineColorRegen.PackToInt());
72  }
73 
74  //------------------------------------------------------------------------------------------------
77  ResourceName GetOutlineImage()
78  {
79  return m_sOutlineImage;
80  }
81 
82  //------------------------------------------------------------------------------------------------
85  ResourceName GetBackgroundImage()
86  {
87  return m_sBackgroundImage;
88  }
89 
90  //------------------------------------------------------------------------------------------------
93  string GetOutlineQuadName()
94  {
95  return m_sOutlineQuadName;
96  }
97 
98  //------------------------------------------------------------------------------------------------
101  string GetBackgroundQuadName()
102  {
103  return m_sBackgroundQuadName;
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_DamageStateUIInfo
Definition: SCR_DamageStateUIInfo.c:2
SCR_BaseContainerLocalizedTitleField
SCR_TabViewComponent SCR_ScriptedWidgetComponent SCR_BaseContainerLocalizedTitleField("m_sTabButtonContent")
Definition: SCR_TabViewComponent.c:963
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_UIInfo
Definition: SCR_UIInfo.c:7
m_Color
ref Color m_Color
Definition: SCR_GeneratorBaseEntity.c:3
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468