10 protected ref ScriptInvoker m_EventOnMenuFocusGained;
11 protected ref ScriptInvoker m_EventOnMenuFocusLost;
12 protected ref ScriptInvoker m_EventOnMenuShow;
13 protected ref ScriptInvoker m_EventOnMenuHide;
14 protected ref ScriptInvoker m_EventOnMenuItem;
15 protected ref ScriptInvoker m_EventOnMenuUpdate;
16 protected ref ScriptInvoker m_EventOnMenuOpen;
17 protected ref ScriptInvoker m_EventOnMenuInit;
18 protected ref ScriptInvoker m_EventOnMenuClose;
24 ScriptInvoker GetOnMenuFocusGained()
26 if (!m_EventOnMenuFocusGained)
27 m_EventOnMenuFocusGained =
new ScriptInvoker();
28 return m_EventOnMenuFocusGained;
30 ScriptInvoker GetOnMenuFocusLost()
32 if (!m_EventOnMenuFocusLost)
33 m_EventOnMenuFocusLost =
new ScriptInvoker();
34 return m_EventOnMenuFocusLost;
36 ScriptInvoker GetOnMenuShow()
38 if (!m_EventOnMenuShow)
39 m_EventOnMenuShow =
new ScriptInvoker();
40 return m_EventOnMenuShow;
42 ScriptInvoker GetOnMenuHide()
44 if (!m_EventOnMenuHide)
45 m_EventOnMenuHide =
new ScriptInvoker();
46 return m_EventOnMenuHide;
48 ScriptInvoker GetOnMenuItem()
50 if (!m_EventOnMenuItem)
51 m_EventOnMenuItem =
new ScriptInvoker();
52 return m_EventOnMenuItem;
54 ScriptInvoker GetOnMenuUpdate()
56 if (!m_EventOnMenuUpdate)
57 m_EventOnMenuUpdate =
new ScriptInvoker();
58 return m_EventOnMenuUpdate;
60 ScriptInvoker GetOnMenuOpen()
62 if (!m_EventOnMenuOpen)
63 m_EventOnMenuOpen =
new ScriptInvoker();
64 return m_EventOnMenuOpen;
66 ScriptInvoker GetOnMenuInit()
68 if (!m_EventOnMenuInit)
69 m_EventOnMenuInit =
new ScriptInvoker();
70 return m_EventOnMenuInit;
74 ScriptInvoker GetOnMenuClose()
76 if (!m_EventOnMenuClose)
77 m_EventOnMenuClose =
new ScriptInvoker();
78 return m_EventOnMenuClose;
86 GetGame().GetCallqueue().CallLater(chatManager.OnMenuClosed, 1);
93 Widget chatPanelWidget =
GetRootWidget().FindAnyWidget(
"ChatPanel");
109 Widget chatPanelWidget =
GetRootWidget().FindAnyWidget(
"ChatPanel");
110 if (!chatPanelWidget)
114 chatManager.HideAllChatPanels();
115 chatManager.ShowChatPanel(chatPanel);
121 return m_MenuRootComponent;
127 return m_DynamicFooter;
131 override void OnMenuFocusGained()
133 super.OnMenuFocusGained();
135 if (m_EventOnMenuFocusGained)
136 m_EventOnMenuFocusGained.Invoke();
140 override void OnMenuFocusLost()
142 super.OnMenuFocusLost();
143 if (m_EventOnMenuFocusLost)
144 m_EventOnMenuFocusLost.Invoke();
148 override void OnMenuShow()
151 if (m_EventOnMenuShow)
152 m_EventOnMenuShow.Invoke();
156 override void OnMenuHide()
159 if (m_EventOnMenuHide)
160 m_EventOnMenuHide.Invoke();
164 override void OnMenuItem(
string menuItemName,
bool changed,
bool finished)
166 super.OnMenuItem(menuItemName, changed, finished);
167 if (m_EventOnMenuItem)
168 m_EventOnMenuItem.Invoke(menuItemName, changed, finished);
172 override void OnMenuUpdate(
float tDelta)
174 super.OnMenuUpdate(tDelta);
177 m_ChatPanel.OnUpdateChat(tDelta);
179 if (IsFocused() && m_EventOnMenuUpdate)
180 m_EventOnMenuUpdate.Invoke(tDelta);
184 override void OnMenuOpen()
189 if (m_EventOnMenuOpen)
190 m_EventOnMenuOpen.Invoke();
194 override void OnMenuInit()
199 if (m_MenuRootComponent)
200 m_MenuRootComponent.Init(
this);
201 if (m_EventOnMenuInit)
202 m_EventOnMenuInit.Invoke();
206 override void OnMenuClose()
210 if (m_EventOnMenuClose)
211 m_EventOnMenuClose.Invoke();