1 ///////////////////////////////////////////////
\r
3 ///////////////////////
\r
4 // This file belongs to dpmod/darkplaces
\r
5 // AK contains all menu functions (especially the required ones)
\r
6 ///////////////////////////////////////////////
\r
8 void() m_updategamestate =
\r
10 // update isserver and clientstate
\r
13 gamestatus = gamestatus | GAME_ISSERVER;
\r
14 if( clientstate() == CS_CONNECTED )
\r
15 gamestatus = gamestatus | GAME_CONNECTED;
\r
16 if( cvar("developer") )
\r
17 gamestatus = gamestatus | GAME_DEVELOPER;
\r
36 // required menu functions
\r
37 void( float pKey, float pAscii ) m_keydown =
\r
42 // actually the menu is the only system that needs to react on key events
\r
43 Menu_Key( pKey, pAscii );
\r
66 m_updategamestate();
\r
69 if( !Menu_Active ) {
\r
70 // test whether we want to force it to be displayed
\r
71 if( !(gamestatus & GAME_CONNECTED) && !(gamestatus & GAME_DEVELOPER) ) {
\r
79 // call m_frame cause draw is the only menu function called once per frame
\r
82 // now the drawing code
\r
85 // draw the cursor on top of the menu
\r
88 // and now the gfx drawing code (for special fx)
\r
96 m_updategamestate();
\r
98 // let also the snd and gfx know (perhaps for sfx)
\r
103 // let the menu manager know
\r
104 Menu_PerformReinit();
\r
113 // let the menu manager know
\r
116 Menu_Active = false;
\r
129 void() m_shutdown =
\r
139 // shutdown key system
\r
145 // shutdown graphic
\r
148 // make sure everything is reset
\r
149 setkeydest( KEY_GAME );
\r
150 setmousetarget( MT_CLIENT );
\r