Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_FieldManualPiece_Text.c
Go to the documentation of this file.
3 {
4  [Attribute(uiwidget: UIWidgets.EditBoxWithButton)]
5  string m_sText;
6 
7  [Attribute(defvalue: "{D06D740EB045FC14}UI/layouts/Menus/FieldManual/Pieces/FieldManual_Piece_Text.layout", uiwidget: UIWidgets.EditBoxWithButton, params: "layout")]
8  ResourceName m_Layout;
9 
10  //------------------------------------------------------------------------------------------------
11  // constructor
13  {
14  if (m_Layout.Trim().IsEmpty())
15  {
16  m_Layout = "{D06D740EB045FC14}UI/layouts/Menus/FieldManual/Pieces/FieldManual_Piece_Text.layout";
17  }
18  }
19 
20  //------------------------------------------------------------------------------------------------
21  override void CreateWidget(notnull Widget parent)
22  {
23  Widget createdWidget = GetGame().GetWorkspace().CreateWidgets(m_Layout, parent);
24  if (!createdWidget)
25  {
26  Print(string.Format("created widget (%2:%1) was null | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, m_Layout, m_sText), LogLevel.DEBUG);
27  return;
28  }
29 
30  TextWidget textWidget = TextWidget.Cast(createdWidget);
31  if (!textWidget)
32  {
33  textWidget = TextWidget.Cast(SCR_WidgetHelper.GetWidgetOrChild(createdWidget, "Text"));
34  }
35 
36  if (!textWidget)
37  {
38  Print("created widget could not be set text | " + FilePath.StripPath(__FILE__) + ":" + __LINE__, LogLevel.DEBUG);
39  return;
40  }
41 
42  textWidget.SetText(m_sText);
43  }
44 }
SCR_FieldManualPiece
Definition: SCR_FieldManualPiece.c:2
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_BaseContainerLocalizedTitleField
SCR_TabViewComponent SCR_ScriptedWidgetComponent SCR_BaseContainerLocalizedTitleField("m_sTabButtonContent")
Definition: SCR_TabViewComponent.c:963
m_Layout
ResourceName m_Layout
Definition: SCR_ActionsToolbarEditorUIComponent.c:6
SCR_WidgetHelper
Definition: SCR_WidgetHelper.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_FieldManualPiece_Text
Definition: SCR_FieldManualPiece_Text.c:2
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
m_sText
class SCR_BaseEditorAttribute m_sText