]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/menu.qh
4ff32361e9c7bf0a2dee8c941f5c2ee5542bb652
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qh
1 #ifndef MENU_H
2 #define MENU_H
3
4 #include "draw.qh"
5 #include "skin.qh"
6
7 #include "oo/base.qh"
8
9 #include "xonotic/util.qh"
10
11 #include "../common/constants.qh"
12 #include "../common/test.qh"
13 #include "../common/util.qh"
14
15 #define localcmd cmd
16
17 #define NULL (null_entity)
18 #define world NULL
19
20 // constants
21
22 const float GAME_ISSERVER       = 1;
23 const float GAME_CONNECTED      = 2;
24 const float GAME_DEVELOPER      = 4;
25
26 // prototypes
27
28 float Menu_Active;
29 float gamestatus;
30
31 const float S_SHIFT = 1;
32 const float S_CTRL = 2;
33 const float S_ALT = 4;
34
35 float frametime;
36 float time;
37
38 entity anim;
39 entity main;
40 void m_hide();
41 void m_display();
42 void m_goto(string name);
43 .string name;
44
45 entity keyGrabber;
46 .void(entity me, float key, float ascii) keyGrabbed;
47
48 float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling
49
50 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.
51 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
52 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
53
54 void m_sync();
55 #endif