Xonotic
menu.qh
Go to the documentation of this file.
1
#pragma once
2
3
#include "
draw.qh
"
4
#include "
skin.qh
"
5
6
#include "
xonotic/util.qh
"
7
8
#include <
common/constants.qh
>
9
#include <
common/util.qh
>
10
11
const
int
GAME_ISSERVER
=
BIT
(0);
12
const
int
GAME_CONNECTED
=
BIT
(1);
13
const
int
GAME_DEVELOPER
=
BIT
(2);
14
15
bool
Menu_Active
;
16
int
gamestatus
;
17
18
const
int
S_SHIFT
= 1;
19
const
int
S_CTRL
= 2;
20
const
int
S_ALT
= 4;
21
22
float
frametime
;
23
float
time
;
24
25
entity
anim
;
26
entity
main
;
27
void
m_hide
();
28
void
m_display
();
29
void
m_goto
(
string
name
);
30
.string
name
;
31
32
entity
keyGrabber
;
33
.void(
entity
this
,
float
key,
float
ascii) keyGrabbed;
34
35
// "virtual" conwidth/height values for other stuff to assume for scaling
36
float
conwidth
,
conheight
;
37
39
float
preMenuInit
();
41
void
preMenuDraw
();
43
void
postMenuDraw
();
44
45
void
m_sync
();
46
47
void
draw_reset_cropped
();
48
49
const
string
MENU_SOUND_CLEAR
=
"sound/menu/clear.wav"
;
50
const
string
MENU_SOUND_CLOSE
=
"sound/menu/close.wav"
;
51
const
string
MENU_SOUND_EXECUTE
=
"sound/menu/execute.wav"
;
52
const
string
MENU_SOUND_FOCUS
=
"sound/menu/focus.wav"
;
53
const
string
MENU_SOUND_OPEN
=
"sound/menu/open.wav"
;
54
const
string
MENU_SOUND_SELECT
=
"sound/menu/select.wav"
;
55
const
string
MENU_SOUND_SLIDE
=
"sound/menu/slide.wav"
;
56
const
string
MENU_SOUND_WINNER
=
"sound/menu/winner.wav"
;
57
58
void
m_play_focus_sound
();
59
void
m_play_click_sound
(
string
soundfile);
MENU_SOUND_FOCUS
const string MENU_SOUND_FOCUS
Definition:
menu.qh:52
GAME_ISSERVER
const int GAME_ISSERVER
Definition:
menu.qh:11
preMenuInit
float preMenuInit()
you have to define this for pre-menu initialization.
Definition:
util.qc:522
anim
entity anim
Definition:
menu.qh:25
keyGrabber
entity keyGrabber
Definition:
menu.qh:32
m_sync
void m_sync()
Definition:
menu.qc:40
preMenuDraw
void preMenuDraw()
this is run before the menu is drawn.
Definition:
util.qc:562
time
float time
Definition:
menu.qh:23
frametime
float frametime
Definition:
menu.qh:22
postMenuDraw
void postMenuDraw()
this is run just after the menu is drawn (or not).
Definition:
util.qc:559
MENU_SOUND_WINNER
const string MENU_SOUND_WINNER
Definition:
menu.qh:56
skin.qh
m_play_click_sound
void m_play_click_sound(string soundfile)
Definition:
menu.qc:997
entity
entity() spawn
MENU_SOUND_CLEAR
const string MENU_SOUND_CLEAR
Definition:
menu.qh:49
S_ALT
const int S_ALT
Definition:
menu.qh:20
m_hide
void m_hide()
Definition:
menu.qc:869
m_play_focus_sound
void m_play_focus_sound()
Definition:
menu.qc:988
MENU_SOUND_CLOSE
const string MENU_SOUND_CLOSE
Definition:
menu.qh:50
BIT
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition:
bits.qh:8
Menu_Active
bool Menu_Active
Definition:
menu.qh:15
S_CTRL
const int S_CTRL
Definition:
menu.qh:19
main
entity main
Definition:
menu.qh:26
util.qh
MENU_SOUND_SELECT
const string MENU_SOUND_SELECT
Definition:
menu.qh:54
GAME_DEVELOPER
const int GAME_DEVELOPER
Definition:
menu.qh:13
m_goto
void m_goto(string name)
Definition:
menu.qc:951
gamestatus
int gamestatus
Definition:
menu.qh:16
MENU_SOUND_SLIDE
const string MENU_SOUND_SLIDE
Definition:
menu.qh:55
S_SHIFT
const int S_SHIFT
Definition:
menu.qh:18
GAME_CONNECTED
const int GAME_CONNECTED
Definition:
menu.qh:12
draw.qh
util.qh
MENU_SOUND_OPEN
const string MENU_SOUND_OPEN
Definition:
menu.qh:53
draw_reset_cropped
void draw_reset_cropped()
Definition:
menu.qc:109
conheight
float conheight
Definition:
menu.qh:36
MENU_SOUND_EXECUTE
const string MENU_SOUND_EXECUTE
Definition:
menu.qh:51
name
string name
Definition:
menu.qh:30
m_display
void m_display()
Definition:
menu.qc:854
conwidth
float conwidth
Definition:
menu.qh:36
constants.qh
menu
menu.qh
Generated on Thu Mar 17 2022 17:26:29 for Xonotic by
1.8.13