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;
37 // menu QC is running; make the aliases use its GameCommand()
41 // required menu functions
42 void( float pKey, float pAscii ) m_keydown =
47 // actually the menu is the only system that needs to react on key events
48 Menu_Key( pKey, pAscii );
77 // test whether we want to force it to be displayed
78 if( !(gamestatus & GAME_CONNECTED) && !(gamestatus & GAME_DEVELOPER) && cvar_string( "menu_directmenu" ) != "" ) {
86 // call m_frame cause draw is the only menu function called once per frame
89 // now the drawing code
92 // draw the cursor on top of the menu
95 // and now the gfx drawing code (for special fx)
105 // let also the snd and gfx know (perhaps for sfx)
110 // let the menu manager know
111 Menu_PerformReinit();
120 // let the menu manager know
146 // shutdown key system
155 // make sure everything is reset
156 setkeydest( KEY_GAME );
157 setmousetarget( MT_CLIENT );