6 protected bool m_bCloseWithGamepad;
8 protected int m_iStorageIndex = -1;
11 void OnActivate(Widget w)
20 override bool OnClick(Widget w,
int x,
int y,
int button)
25 m_OnActivated.Invoke(
this,
m_sActionName, m_pParentStorage, m_iStorageIndex);
30 override protected void OnInput()
35 if (!m_bCloseWithGamepad)
38 bool bEnabled =
m_wRoot.IsEnabled();
39 bool bVisible =
m_wRoot.IsVisible();
41 if (!bEnabled || !bVisible)
44 m_OnActivated.Invoke(
this,
m_sActionName, m_pParentStorage, m_iStorageIndex);
48 override void SetAction(
string action)
56 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
58 super.OnMouseLeave(w, enterW, x, y);
60 GetGame().GetWorkspace().SetFocusedWidget(
null);
68 m_pParentStorage = pParentStorage;
72 void SetStorageIndex(
int index)
74 m_iStorageIndex =
index;
78 void EnableCloseWithGamepad(
bool enable)
80 m_bCloseWithGamepad = enable;
86 return m_iStorageIndex;