Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ButtonEffectText.c
Go to the documentation of this file.
1 [BaseContainerProps(configRoot : true), SCR_ButtonEffectTitleAttribute("Text", "m_sWidgetName")]
3 class SCR_ButtonEffectText : SCR_ButtonEffectWidgetBase
4 {
5  [Attribute()]
6  string m_sDefault;
7 
8  [Attribute()]
9  string m_sHovered;
10 
11  [Attribute()]
12  string m_sActivated;
13 
14  [Attribute()]
15  string m_sActivatedHovered;
16 
17  [Attribute()]
18  string m_sDisabled;
19 
20  [Attribute()]
21  string m_sDisabledActivated;
22 
23  [Attribute()]
24  string m_sFocusGained;
25 
26  [Attribute()]
27  string m_sFocusLost;
28 
29  [Attribute()]
30  string m_sToggledOn;
31 
32  [Attribute()]
33  string m_sToggledOff;
34 
35  //------------------------------------------------------------------------------------------------
36  override void OnStateDefault(bool instant)
37  {
38  Apply(m_sDefault);
39  }
40 
41  //------------------------------------------------------------------------------------------------
42  override void OnStateHovered(bool instant)
43  {
44  Apply(m_sHovered);
45  }
46 
47  //------------------------------------------------------------------------------------------------
48  override void OnStateActivated(bool instant)
49  {
50  Apply(m_sActivated);
51  }
52 
53  //------------------------------------------------------------------------------------------------
54  override void OnStateActivatedHovered(bool instant)
55  {
56  Apply(m_sActivatedHovered);
57  }
58 
59  //------------------------------------------------------------------------------------------------
60  override void OnStateDisabled(bool instant)
61  {
62  Apply(m_sDisabled);
63  }
64 
65  //------------------------------------------------------------------------------------------------
66  override void OnStateDisabledActivated(bool instant)
67  {
68  Apply(m_sDisabled);
69  }
70 
71  //------------------------------------------------------------------------------------------------
72  override void OnFocusGained(bool instant)
73  {
74  Apply(m_sFocusGained);
75  }
76 
77  //------------------------------------------------------------------------------------------------
78  override void OnFocusLost(bool instant)
79  {
80  Apply(m_sFocusLost);
81  }
82 
83  //------------------------------------------------------------------------------------------------
84  override void OnToggledOn(bool instant)
85  {
86  Apply(m_sToggledOn);
87  }
88 
89  //------------------------------------------------------------------------------------------------
90  override void OnToggledOff(bool instant)
91  {
92  Apply(m_sToggledOff);
93  }
94 
95  //------------------------------------------------------------------------------------------------
96  protected void Apply(string text)
97  {
98  TextWidget tw = TextWidget.Cast(m_wTarget);
99 
100  if (!tw)
101  return;
102 
103  tw.SetText(text);
104  }
105 }
SCR_ButtonEffectText
Effect which changes text of a text or rich text widget.
Definition: SCR_ButtonEffectText.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
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