Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SimpleEntryComponent.c
Go to the documentation of this file.
1 
5 //------------------------------------------------------------------------------------------------------------------------
7 {
8  [Attribute("Label")]
9  protected string m_sLabel;
10 
11  [Attribute("Message")]
12  protected string m_sMessage;
13 
14  [Attribute("Label")]
15  protected string m_sLabelText;
16 
17  [Attribute("Message")]
18  protected string m_sMessageText;
19 
20  protected TextWidget m_wLabel;
21  protected TextWidget m_wMessage;
22 
23  //------------------------------------------------------------------------------------------------------------------------
24  override void HandlerAttached(Widget w)
25  {
26  super.HandlerAttached(w);
27 
28  m_wLabel = TextWidget.Cast(w.FindAnyWidget(m_sLabel));
29  m_wMessage = TextWidget.Cast(w.FindAnyWidget(m_sMessage));
30 
31  if (m_wLabel)
32  m_wLabel.SetText(m_sLabelText);
33 
34  if (m_wMessage)
35  m_wMessage.SetText(m_sMessageText);
36  }
37 
38  //------------------------------------------------------------------------------------------------------------------------
39  void SetMessages(string left, string right)
40  {
41  m_sLabelText = left;
42  m_sMessageText = right;
43 
44  if (m_wLabel)
45  m_wLabel.SetText(left);
46 
47  if (m_wMessage)
48  m_wMessage.SetText(right);
49  }
50 
51  //------------------------------------------------------------------------------------------------------------------------
52  TextWidget GetLabel()
53  {
54  return m_wLabel;
55  }
56 
57  //------------------------------------------------------------------------------------------------------------------------
58  string GetLeftText()
59  {
60  if (!m_wLabel)
61  return string.Empty;
62 
63  return m_wLabel.GetText();
64  }
65 
66  //------------------------------------------------------------------------------------------------------------------------
67  TextWidget GetMessage()
68  {
69  return m_wMessage;
70  }
71 
72  //------------------------------------------------------------------------------------------------------------------------
73  string GetRightText()
74  {
75  if (!m_wMessage)
76  return string.Empty;
77 
78  return m_wMessage.GetText();
79  }
80 
81  //------------------------------------------------------------------------------------------------------------------------
82  Widget GetRoot()
83  {
84  return m_wRoot;
85  }
86 }
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
m_wMessage
protected RichTextWidget m_wMessage
Definition: SCR_BrowserHoverTooltipComponent.c:24
SCR_SimpleEntryComponent
Definition: SCR_SimpleEntryComponent.c:6
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_ScriptedWidgetComponent
Definition: SCR_ScriptedWidgetComponent.c:7