Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_FieldManual_StatisticsLineComponent.c
Go to the documentation of this file.
2 {
3  protected Widget m_wRootWidget;
4  protected TextWidget m_wValue;
5 
6  //------------------------------------------------------------------------------------------------
7  // constructor
9  void SCR_FieldManual_StatisticsLineComponent(notnull Widget rootWidget)
10  {
11  m_wRootWidget = rootWidget;
12  m_wValue = TextWidget.Cast(rootWidget.FindAnyWidget("Value"));
13  }
14 
15  //------------------------------------------------------------------------------------------------
17  void SetValue(string value)
18  {
19  if (m_wValue)
20  m_wValue.SetText(value);
21  }
22 
23  //------------------------------------------------------------------------------------------------
25  void RemoveWidgetFromHierarchy()
26  {
27  m_wRootWidget.RemoveFromHierarchy();
28  }
29 
30  //------------------------------------------------------------------------------------------------
33  void SetTranslatedValue(string value, string parameter1 = "")
34  {
35  m_wValue.SetTextFormat(value, parameter1);
36  }
37 
38  //------------------------------------------------------------------------------------------------
42  static SCR_FieldManual_StatisticsLineComponent GetComponent(notnull Widget parentWidget, string widgetName)
43  {
44  Widget result = parentWidget.FindAnyWidget(widgetName);
45  if (!result)
46  return null;
47 
48  return GetComponent(result);
49  }
50 
51  //------------------------------------------------------------------------------------------------
54  static SCR_FieldManual_StatisticsLineComponent GetComponent(notnull Widget widget)
55  {
56  return new SCR_FieldManual_StatisticsLineComponent(widget);
57  }
58 }
SCR_FieldManual_StatisticsLineComponent
Definition: SCR_FieldManual_StatisticsLineComponent.c:1