Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CustomArrayEditableEntityUIComponent.c
Go to the documentation of this file.
2 {
3  [Attribute(desc: "Image widget to set icon same as EditableEntity UI info icon")]
4  protected ref array<string> m_sIconWidgetNames;
5 
6  [Attribute("0", desc: "If true will attempt to color the widget this script is attached to if the EditableEntity uses SCR_ColorUIInfo")]
7  protected bool m_bColorWidget;
8 
9  //------------------------------------------------------------------------------------------------
11  {
12  //~ Set custom textures
13  if (info)
14  {
15  ImageWidget iconWidget;
16 
17  //~ Set Icons
18  if (m_sIconWidgetNames)
19  {
20  foreach (string icon : m_sIconWidgetNames)
21  {
22  iconWidget = ImageWidget.Cast(GetWidget().FindAnyWidget(icon));
23  info.SetIconTo(iconWidget);
24  }
25  }
26 
27  //~ Color widget
28  if (m_bColorWidget)
29  {
30  SCR_ColorUIInfo colorInfo = SCR_ColorUIInfo.Cast(info);
31 
32  if (colorInfo)
33  GetWidget().SetColor(colorInfo.GetColor());
34  else
35  Print("'SCR_CustomArrayEditableEntityUIComponent' tried to set the UI color but the EditableEntity is not using SCR_ColorUIInfo", LogLevel.WARNING);
36  }
37  }
38  }
39 }
SCR_CustomArrayEditableEntityUIComponent
Definition: SCR_CustomArrayEditableEntityUIComponent.c:1
SCR_ColorUIInfo
Definition: SCR_ColorUIInfo.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_EditableEntityBaseSlotUIComponent
Definition: SCR_EditableEntityBaseSlotUIComponent.c:6
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseEditableEntityUIComponent
Definition: SCR_BaseEditableEntityUIComponent.c:8
SCR_UIInfo
Definition: SCR_UIInfo.c:7
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
GetWidget
protected Widget GetWidget()
Definition: SCR_VonDisplay.c:155