MCPcopy Create free account
hub / github.com/demoth/jake2 / PushMenu

Method PushMenu

client/src/main/java/jake2/client/Menu.java:189–217  ·  view source on GitHub ↗
(Command draw, keyfunc_t key)

Source from the content-addressed store, hash-verified

187 }
188
189 private static void PushMenu(Command draw, keyfunc_t key) { //, String(*key)
190 // (int k) ) {
191 int i;
192
193 if (Cvar.getInstance().VariableValue("maxclients") == 1 && Globals.server_state != ServerStates.SS_DEAD)
194 Cvar.getInstance().Set("paused", "1");
195
196 // if this menu is already present, drop back to that level
197 // to avoid stacking menus by hotkeys
198 for (i = 0; i < m_menudepth; i++)
199 if (m_layers[i].draw == draw && m_layers[i].key == key) {
200 m_menudepth = i;
201 }
202
203 if (i == m_menudepth) {
204 if (m_menudepth >= MAX_MENU_DEPTH)
205 Com.Error(ERR_FATAL, "PushMenu: MAX_MENU_DEPTH");
206
207 m_layers[m_menudepth].draw = draw;//m_drawfunc;
208 m_layers[m_menudepth].key = key;//m_keyfunc;
209 }
210 m_menudepth++;
211 m_drawfunc = draw;
212 m_keyfunc = key;
213
214 m_entersound = true;
215
216 ClientGlobals.cls.key_dest = key_menu;
217 }
218
219 static void ForceMenuOff() {
220 m_drawfunc = null;

Callers 15

Menu_Main_fMethod · 0.95
Menu_Multiplayer_fMethod · 0.95
Menu_Keys_fMethod · 0.95
Menu_Options_fMethod · 0.95
Menu_Video_fMethod · 0.95
Menu_Credits_fMethod · 0.95
Menu_Game_fMethod · 0.95
Menu_LoadGame_fMethod · 0.95
Menu_SaveGame_fMethod · 0.95
Menu_JoinServer_fMethod · 0.95
Menu_StartServer_fMethod · 0.95
Menu_DMOptions_fMethod · 0.95

Calls 4

getInstanceMethod · 0.95
ErrorMethod · 0.95
VariableValueMethod · 0.80
SetMethod · 0.80

Tested by

no test coverage detected