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