Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LayoutTemplateComponent.c
Go to the documentation of this file.
1 class SCR_LayoutTemplateComponent: ScriptedWidgetComponent
2 {
3  [Attribute("", UIWidgets.Auto, "Template identifier (in case there are multiple)")]
4  protected string m_sName;
5 
6  [Attribute("", UIWidgets.ResourceNamePicker, "Template layout", "layout")]
7  protected ResourceName m_Layout;
8 
9  ResourceName GetName()
10  {
11  return m_sName;
12  }
13  ResourceName GetLayout()
14  {
15  if (m_Layout == "") Print("Layout not defined in SCR_LayoutTemplateComponent component!", LogLevel.ERROR);
16  return m_Layout;
17  }
18 
19  static ResourceName GetLayout(Widget w, string name = "")
20  {
21  if (!w)
22  {
23  Print("Cannot find SCR_LayoutTemplateComponent, widget is null!", LogLevel.WARNING);
24  return ResourceName.Empty;
25  }
26  int componentsCount = w.GetNumHandlers();
27  for (int i = 0; i < componentsCount; i++)
28  {
29  SCR_LayoutTemplateComponent component = SCR_LayoutTemplateComponent.Cast(w.GetHandler(i));
30  if (component && component.GetName() == name) return component.GetLayout();
31  }
32 
33  Print(string.Format("Cannot find SCR_LayoutTemplateComponent component in widget '%1'!", w.GetName()), LogLevel.ERROR);
34  return ResourceName.Empty;
35  }
36 };
m_Layout
ResourceName m_Layout
Definition: SCR_ActionsToolbarEditorUIComponent.c:6
SCR_LayoutTemplateComponent
Definition: SCR_LayoutTemplateComponent.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_sName
protected LocalizedString m_sName
Definition: SCR_GroupIdentityComponent.c:19