]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/menu.qh
Merge branch 'master' into terencehill/hud_cleanups
[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 "xonotic/util.qh"
8
9 #include "../common/constants.qh"
10 #include "../common/util.qh"
11
12 // constants
13
14 const int GAME_ISSERVER         = 1;
15 const int GAME_CONNECTED        = 2;
16 const int GAME_DEVELOPER        = 4;
17
18 // prototypes
19
20 float Menu_Active;
21 int gamestatus;
22
23 const int S_SHIFT = 1;
24 const int S_CTRL = 2;
25 const int S_ALT = 4;
26
27 float frametime;
28 float time;
29
30 entity anim;
31 entity main;
32 void m_hide();
33 void m_display();
34 void m_goto(string name);
35 .string name;
36
37 entity keyGrabber;
38 .void(entity me, float key, float ascii) keyGrabbed;
39
40 float conwidth, conheight; // "virtual" conwidth/height values for other stuff to assume for scaling
41
42 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.
43 void preMenuDraw(); // this is run before the menu is drawn. You may put some stuff there that has to be done every frame.
44 void postMenuDraw(); // this is run just after the menu is drawn (or not). Useful to draw something over everything else.
45
46 void m_sync();
47
48 void draw_reset_cropped();
49
50 // sounds
51
52 const string MENU_SOUND_CLEAR   = "sound/menu/clear.wav";
53 const string MENU_SOUND_CLOSE   = "sound/menu/close.wav";
54 const string MENU_SOUND_EXECUTE = "sound/menu/execute.wav";
55 const string MENU_SOUND_FOCUS   = "sound/menu/focus.wav";
56 const string MENU_SOUND_OPEN    = "sound/menu/open.wav";
57 const string MENU_SOUND_SELECT  = "sound/menu/select.wav";
58 const string MENU_SOUND_SLIDE   = "sound/menu/slide.wav";
59 const string MENU_SOUND_WINNER  = "sound/menu/winner.wav";
60
61 void m_play_focus_sound();
62 void m_play_click_sound(string soundfile);
63 #endif