3 [
Attribute(
"", UIWidgets.Auto,
"Template identifier (in case there are multiple)")]
4 protected string m_sName;
6 [
Attribute(
"", UIWidgets.ResourceNamePicker,
"Template layout",
"layout")]
7 protected ResourceName m_Layout;
13 ResourceName GetLayout()
15 if (
m_Layout ==
"") Print(
"Layout not defined in SCR_LayoutTemplateComponent component!", LogLevel.ERROR);
19 static ResourceName GetLayout(Widget w,
string name =
"")
23 Print(
"Cannot find SCR_LayoutTemplateComponent, widget is null!", LogLevel.WARNING);
24 return ResourceName.Empty;
26 int componentsCount = w.GetNumHandlers();
27 for (
int i = 0; i < componentsCount; i++)
30 if (component && component.GetName() == name)
return component.GetLayout();
33 Print(
string.Format(
"Cannot find SCR_LayoutTemplateComponent component in widget '%1'!", w.GetName()), LogLevel.ERROR);
34 return ResourceName.Empty;