Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LayoutTemplateComponent.c
Go to the documentation of this file.
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")]
8
10 {
11 return m_sName;
12 }
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};
static ResourceName GetLayout(Widget w, string name="")
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute