Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ButtonEffectSize.c
Go to the documentation of this file.
1 [BaseContainerProps(configRoot : true), SCR_ButtonEffectTitleAttribute("Size", "m_sWidgetName")]
2 class SCR_ButtonEffectSize : SCR_ButtonEffectWidgetBase
3 {
4  [Attribute(defvalue: "0.2", UIWidgets.EditBox, "Duration of animation")]
5  protected float m_vAnimationTime;
6 
7  [Attribute()]
8  vector m_vDefault;
9 
10  [Attribute()]
11  vector m_vHovered;
12 
13  [Attribute()]
14  vector m_vActivated;
15 
16  [Attribute()]
17  vector m_vActivatedHovered;
18 
19  [Attribute()]
20  vector m_vDisabled;
21 
22  [Attribute()]
23  vector m_vDisabledActivated;
24 
25  [Attribute()]
26  vector m_vClicked;
27 
28  [Attribute()]
29  vector m_vFocusGained;
30 
31  [Attribute()]
32  vector m_vFocusLost;
33 
34  [Attribute()]
35  vector m_vToggledOn;
36 
37  [Attribute()]
38  vector m_vToggledOff;
39 
40  //------------------------------------------------------------------------------------------------
41  override void OnStateDefault(bool instant)
42  {
43  Apply(m_vDefault, instant);
44  }
45 
46  //------------------------------------------------------------------------------------------------
47  override void OnStateHovered(bool instant)
48  {
49  Apply(m_vHovered, instant);
50  }
51 
52  //------------------------------------------------------------------------------------------------
53  override void OnStateActivated(bool instant)
54  {
55  Apply(m_vActivated, instant);
56  }
57 
58  //------------------------------------------------------------------------------------------------
59  override void OnStateActivatedHovered(bool instant)
60  {
61  Apply(m_vActivatedHovered, instant);
62  }
63 
64  //------------------------------------------------------------------------------------------------
65  override void OnStateDisabled(bool instant)
66  {
67  Apply(m_vDisabled, instant);
68  }
69 
70  //------------------------------------------------------------------------------------------------
71  override void OnStateDisabledActivated(bool instant)
72  {
73  Apply(m_vDisabledActivated, instant);
74  }
75 
76  //------------------------------------------------------------------------------------------------
77  override void OnClicked(bool instant)
78  {
79  Apply(m_vClicked, instant);
80  }
81 
82  //------------------------------------------------------------------------------------------------
83  override void OnFocusGained(bool instant)
84  {
85  Apply(m_vFocusGained, instant);
86  }
87 
88  //------------------------------------------------------------------------------------------------
89  override void OnFocusLost(bool instant)
90  {
91  Apply(m_vFocusLost, instant);
92  }
93 
94  //------------------------------------------------------------------------------------------------
95  override void OnToggledOn(bool instant)
96  {
97  Apply(m_vToggledOn, instant);
98  }
99 
100  //------------------------------------------------------------------------------------------------
101  override void OnToggledOff(bool instant)
102  {
103  Apply(m_vToggledOff, instant);
104  }
105 
106  //------------------------------------------------------------------------------------------------
107  override void OnDisabled()
108  {
109  AnimateWidget.StopAnimation(m_wTarget, WidgetAnimationFrameSize);
110  }
111 
112  //------------------------------------------------------------------------------------------------
113  protected void Apply(vector value, bool instant)
114  {
115  if (m_wTarget)
116  {
117  if (!instant && m_vAnimationTime != 0)
118  {
119  float size[2] = {value[0], value[1]};
120  AnimateWidget.Size(m_wTarget, size, 1 / m_vAnimationTime);
121  }
122  else
123  {
124  AnimateWidget.StopAnimation(m_wTarget, WidgetAnimationFrameSize);
125  FrameSlot.SetSize(m_wTarget, value[0], value[1]);
126  }
127  }
128  }
129 }
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
SCR_ButtonEffectSize
Definition: SCR_ButtonEffectSize.c:2