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 );
70 // test whether we want to force it to be displayed
71 if( !(gamestatus & GAME_CONNECTED) && !(gamestatus & GAME_DEVELOPER) ) {
79 // call m_frame cause draw is the only menu function called once per frame
82 // now the drawing code
85 // draw the cursor on top of the menu
88 // and now the gfx drawing code (for special fx)
98 // let also the snd and gfx know (perhaps for sfx)
103 // let the menu manager know
104 Menu_PerformReinit();
113 // let the menu manager know
139 // shutdown key system
148 // make sure everything is reset
149 setkeydest( KEY_GAME );
150 setmousetarget( MT_CLIENT );