1 [
BaseContainerProps(configRoot :
true), SCR_ButtonEffectTitleAttribute(
"Size",
"m_sWidgetName")]
4 [
Attribute(defvalue:
"0.2", UIWidgets.EditBox,
"Duration of animation")]
5 protected float m_vAnimationTime;
17 vector m_vActivatedHovered;
23 vector m_vDisabledActivated;
29 vector m_vFocusGained;
41 override void OnStateDefault(
bool instant)
43 Apply(m_vDefault, instant);
47 override void OnStateHovered(
bool instant)
49 Apply(m_vHovered, instant);
53 override void OnStateActivated(
bool instant)
55 Apply(m_vActivated, instant);
59 override void OnStateActivatedHovered(
bool instant)
61 Apply(m_vActivatedHovered, instant);
65 override void OnStateDisabled(
bool instant)
67 Apply(m_vDisabled, instant);
71 override void OnStateDisabledActivated(
bool instant)
73 Apply(m_vDisabledActivated, instant);
77 override void OnClicked(
bool instant)
79 Apply(m_vClicked, instant);
83 override void OnFocusGained(
bool instant)
85 Apply(m_vFocusGained, instant);
89 override void OnFocusLost(
bool instant)
91 Apply(m_vFocusLost, instant);
95 override void OnToggledOn(
bool instant)
97 Apply(m_vToggledOn, instant);
101 override void OnToggledOff(
bool instant)
103 Apply(m_vToggledOff, instant);
107 override void OnDisabled()
109 AnimateWidget.StopAnimation(m_wTarget, WidgetAnimationFrameSize);
113 protected void Apply(vector value,
bool instant)
117 if (!instant && m_vAnimationTime != 0)
119 float size[2] = {value[0], value[1]};
120 AnimateWidget.Size(m_wTarget, size, 1 / m_vAnimationTime);
124 AnimateWidget.StopAnimation(m_wTarget, WidgetAnimationFrameSize);
125 FrameSlot.SetSize(m_wTarget, value[0], value[1]);