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;
36 // required menu functions
37 void( float pKey, float pAscii ) m_keydown =
42 // actually the menu is the only system that needs to react on key events
43 Menu_Key( pKey, pAscii );
68 // test whether we want to force it to be displayed
69 if( !(gamestatus & GAME_CONNECTED) && !(gamestatus & GAME_DEVELOPER) ) {
77 // call m_frame cause draw is the only menu function called once per frame
80 // now the drawing code
83 // draw the cursor on top of the menu
86 // and now the gfx drawing code (for special fx)
96 // let also the snd and gfx know (perhaps for sfx)
101 // let the menu manager know
102 Menu_PerformReinit();
111 // let the menu manager know
137 // shutdown key system
146 // make sure everything is reset
147 setkeydest( KEY_GAME );
148 setmousetarget( MT_CLIENT );