9 protected float m_fDisabledOpacity;
12 protected string m_sSizeLayout;
16 protected bool m_bEnabled =
true;
17 protected float m_fOriginalSize;
18 protected float m_fAdjustedSize;
20 protected Widget m_wSizeLayout;
23 protected ref ScriptInvoker<SCR_SelectionMenuEntryComponent> m_OnMouseEnter;
24 protected ref ScriptInvoker<SCR_SelectionMenuEntryComponent> m_OnMouseLeave;
27 protected void InvokeOnMouseEnter()
34 ScriptInvoker GetOnMouseEnter()
43 protected void InvokeOnMouseLeave()
50 ScriptInvoker GetOnMouseLeave()
59 protected void InvokeOnClick()
66 ScriptInvoker GetOnClick()
79 override void HandlerAttached(Widget w)
81 super.HandlerAttached(w);
85 m_wSizeLayout =
m_wRoot.FindAnyWidget(m_sSizeLayout);
86 m_fOriginalSize = GetLayoutSize();
87 m_fAdjustedSize = m_fOriginalSize;
91 override bool OnMouseEnter(Widget w,
int x,
int y)
98 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
100 InvokeOnMouseLeave();
105 override bool OnClick(Widget w,
int x,
int y,
int button)
118 void SetEnabled(
bool enabled)
129 m_wRoot.SetOpacity(m_fDisabledOpacity);
133 float GetLayoutSize()
138 return FrameSlot.GetSize(m_wSizeLayout)[0];
149 float GetOriginalSize()
151 return m_fOriginalSize;
155 float GetAdjustedSize()
157 return m_fAdjustedSize;