1 ///////////////////////////////////////////////
3 ///////////////////////
4 // This file belongs to dpmod/darkplaces
5 // AK contains all menu functions (especially the required ones)
6 ///////////////////////////////////////////////
8 void() m_updategamestate =
10 // update isserver and clientstate
13 gamestatus = gamestatus | GAME_ISSERVER;
14 if( clientstate() == CS_CONNECTED )
15 gamestatus = gamestatus | GAME_CONNECTED;
16 if( cvar("developer") )
17 gamestatus = gamestatus | GAME_DEVELOPER;
35 // menu QC is running; make the aliases use its GameCommand()
39 // required menu functions
40 void( float pKey, float pAscii ) m_keydown =
45 // actually the menu is the only system that needs to react on key events
46 Menu_Key( pKey, pAscii );
73 // test whether we want to force it to be displayed
74 if( !(gamestatus & GAME_CONNECTED) && !(gamestatus & GAME_DEVELOPER) && cvar_string( "menu_directmenu" ) != "" ) {
82 // call m_frame cause draw is the only menu function called once per frame
85 // now the drawing code
88 // draw the cursor on top of the menu
91 // and now the gfx drawing code (for special fx)
101 // let also the snd and gfx know (perhaps for sfx)
106 // let the menu manager know
107 Menu_PerformReinit();
116 // let the menu manager know
142 // shutdown key system
151 // make sure everything is reset
152 setkeydest( KEY_GAME );
153 setmousetarget( MT_CLIENT );