Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_FieldManualPiece_Text.c
Go to the documentation of this file.
2class SCR_FieldManualPiece_Text : SCR_FieldManualPiece
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
12 void SCR_FieldManualPiece_Text()
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}
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_PlayerCommandingConfigActionPair Managed SCR_BaseContainerLocalizedTitleField("m_sCommandName")
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