5 protected string m_sButtonDescription;
7 protected bool m_bIsFocused;
8 protected bool m_bListeningToMouseLeft;
9 protected bool m_FocusUpdateBlocked;
11 protected const int MOUSE_LEFT_REMOVE_DESCRIPTION_DELAY = 50;
22 m_AttributeUIComponent = attributeUIComponent;
24 if (!buttonDescription.IsEmpty())
25 m_sButtonDescription = buttonDescription;
27 m_sButtonDescription = buttonName;
29 button.m_OnShowBorder.Insert(OnButtonFocus);
38 override bool OnMouseEnter(Widget w,
int x,
int y)
41 if (!m_AttributeUIComponent)
44 if (!m_AttributeUIComponent.GetIsFocused())
47 m_AttributeUIComponent.ShowButtonDescription(
this,
true, m_sButtonDescription);
51 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
55 if (!m_bListeningToMouseLeft)
57 m_bListeningToMouseLeft =
true;
58 GetGame().GetCallqueue().CallLater(OnMouseLeaveDelay, MOUSE_LEFT_REMOVE_DESCRIPTION_DELAY);
64 protected void OnMouseLeaveDelay()
66 m_bListeningToMouseLeft =
false;
71 if (!m_AttributeUIComponent)
74 m_AttributeUIComponent.ShowButtonDescription(
this,
false);