]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu-div0test/menu.qh
- Spawn points can now be activated (turns to player's .team - doesn't do anything...
[divverent/nexuiz.git] / data / qcsrc / menu-div0test / menu.qh
1 #define localcmd cmd
2
3 #define NULL (null_entity)
4
5 #ifndef MAPINFO
6 #warning Sorry, need to compile with -DMAPINFO enabled (server QC too, by the way)
7 !
8 #endif
9
10 // constants
11
12 const string string_null;
13 const vector eX = '1 0 0';
14 const vector eY = '0 1 0';
15 const vector eZ = '0 0 1';
16
17 const float GAME_ISSERVER       = 1;
18 const float GAME_CONNECTED      = 2;
19 const float GAME_DEVELOPER      = 4;
20
21 // prototypes
22
23 float Menu_Active;
24 float gamestatus;
25
26 const float S_SHIFT = 1;
27 const float S_CTRL = 2;
28 const float S_ALT = 4;
29
30 float frametime;
31 float time;
32
33 entity main;
34 void m_hide();
35 void m_display();
36 void m_goto(string name);
37 .string name;
38
39 entity keyGrabber;
40 .void(entity me, float key, float ascii) keyGrabbed;
41
42 float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling
43
44 void SUB_Null();
45
46 float preMenuInit(); // you have to define this for pre-menu initialization. Return 0 if initialization needs to be retried a frame later, 1 if it succeeded.
47 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
48 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.