]> icculus.org git repositories - divverent/nexuiz.git/blob - menusrc/msys.qc
The color control menu should be finished now - the pattern should perhaps be adjuste...
[divverent/nexuiz.git] / menusrc / msys.qc
1 //////////////////////////////////////////////////////////
2 // sys globals
3
4 entity self;
5
6 /////////////////////////////////////////////////////////
7 void            end_sys_globals;
8 /////////////////////////////////////////////////////////
9 // sys fields
10
11 /////////////////////////////////////////////////////////
12 void            end_sys_fields;
13 /////////////////////////////////////////////////////////
14 // sys functions
15
16 void() m_init;
17 void(float keynr, float ascii) m_keydown;
18 void() m_draw;
19 void() m_toggle;
20 void() m_shutdown;
21
22 /////////////////////////////////////////////////////////
23 // sys constants
24 ///////////////////////////
25 // key constants
26
27 //
28 // these are the key numbers that should be passed to Key_Event
29 //
30 float K_TAB                     =       9;
31 float K_ENTER           =       13;
32 float K_ESCAPE          =       27;
33 float K_SPACE           =       32;
34
35 // normal keys should be passed as lowercased ascii
36
37 float K_BACKSPACE       =       127;
38 float K_UPARROW         =       128;
39 float K_DOWNARROW       =       129;
40 float K_LEFTARROW       =       130;
41 float K_RIGHTARROW      =       131;
42
43 float K_ALT             =       132;
44 float K_CTRL    =       133;
45 float K_SHIFT   =       134;
46 float K_F1              =       135;
47 float K_F2              =       136;
48 float K_F3              =       137;
49 float K_F4              =       138;
50 float K_F5              =       139;
51 float K_F6              =       140;
52 float K_F7              =       141;
53 float K_F8              =       142;
54 float K_F9              =       143;
55 float K_F10             =       144;
56 float K_F11             =       145;
57 float K_F12             =       146;
58 float K_INS             =       147;
59 float K_DEL             =       148;
60 float K_PGDN    =       149;
61 float K_PGUP    =       150;
62 float K_HOME    =       151;
63 float K_END             =       152;
64
65 float K_KP_HOME                 =       160;
66 float K_KP_UPARROW              =       161;
67 float K_KP_PGUP                 =       162;
68 float K_KP_LEFTARROW    =       163;
69 float K_KP_5                    =       164;
70 float K_KP_RIGHTARROW   =       165;
71 float K_KP_END                  =       166;
72 float K_KP_DOWNARROW    =       167;
73 float K_KP_PGDN                 =       168;
74 float K_KP_ENTER                =       169;
75 float K_KP_INS                  =       170;
76 float K_KP_DEL                  =       171;
77 float K_KP_SLASH                =       172;
78 float K_KP_MINUS                =       173;
79 float K_KP_PLUS                 =       174;
80
81 float K_PAUSE           =       255;
82
83 //
84 // joystick buttons
85 //
86 float K_JOY1            =       203;
87 float K_JOY2            =       204;
88 float K_JOY3            =       205;
89 float K_JOY4            =       206;
90
91 //
92 // aux keys are for multi-buttoned joysticks to generate so they can use
93 // the normal binding process
94 //
95 float K_AUX1            =       207;
96 float K_AUX2            =       208;
97 float K_AUX3            =       209;
98 float K_AUX4            =       210;
99 float K_AUX5            =       211;
100 float K_AUX6            =       212;
101 float K_AUX7            =       213;
102 float K_AUX8            =       214;
103 float K_AUX9            =       215;
104 float K_AUX10           =       216;
105 float K_AUX11           =       217;
106 float K_AUX12           =       218;
107 float K_AUX13           =       219;
108 float K_AUX14           =       220;
109 float K_AUX15           =       221;
110 float K_AUX16           =       222;
111 float K_AUX17           =       223;
112 float K_AUX18           =       224;
113 float K_AUX19           =       225;
114 float K_AUX20           =       226;
115 float K_AUX21           =       227;
116 float K_AUX22           =       228;
117 float K_AUX23           =       229;
118 float K_AUX24           =       230;
119 float K_AUX25           =       231;
120 float K_AUX26           =       232;
121 float K_AUX27           =       233;
122 float K_AUX28           =       234;
123 float K_AUX29           =       235;
124 float K_AUX30           =       236;
125 float K_AUX31           =       237;
126 float K_AUX32           =       238;
127
128 float K_MWHEELDOWN      =       239;
129 float K_MWHEELUP        =       240;
130
131 //
132 // mouse buttons generate virtual keys
133 //
134 float K_MOUSE1          =       241;
135 float K_MOUSE2          =       242;
136 float K_MOUSE3          =       243;
137 // LordHavoc: thanks to backslash for this MOUSE4 and MOUSE5 code,
138 // LordHavoc: however I renumbered it differently and added MOUSE6 through MOUSE10
139 /* backslash :: imouse explorer buttons */
140 float K_MOUSE4          =       244;
141 float K_MOUSE5          =       245;
142 /* backslash :: renumber everything that follows so that the mouse4/5 buttons can be squeezed in */
143 // LordHavoc: added these for completeness
144 float K_MOUSE6          =       246;
145 float K_MOUSE7          =       247;
146 float K_MOUSE8          =       248;
147 float K_MOUSE9          =       249;
148 float K_MOUSE10         =       250;
149
150 ///////////////////////////
151 // key dest constants
152
153 float KEY_GAME          =       0;
154 float KEY_MENU          =       2;
155 float KEY_UNKNOWN       =       3;
156
157 ///////////////////////////
158 // file constants
159
160 float FILE_READ = 0;
161 float FILE_APPEND = 1;
162 float FILE_WRITE = 2;
163
164 ///////////////////////////
165 // logical constants (just for completeness)
166
167 float TRUE      = 1;
168 float FALSE = 0;
169
170 ///////////////////////////
171 // boolean constants
172
173 float true = 1;
174 float false = 0;
175
176 ///////////////////////////
177 // msg constants
178
179 float MSG_BROADCAST             = 0;            // unreliable to all
180 float MSG_ONE                   = 1;            // reliable to one (msg_entity)
181 float MSG_ALL                   = 2;            // reliable to all
182 float MSG_INIT                  = 3;            // write to the init string
183
184 /////////////////////////////
185 // mouse target constants
186
187 float MT_MENU = 1;
188 float MT_CLIENT = 2;
189
190 /////////////////////////
191 // client state constants
192
193 float CS_DEDICATED              = 0;
194 float CS_DISCONNECTED   = 1;
195 float CS_CONNECTED              = 2;
196
197 ///////////////////////////
198 // blend flags
199
200 float DRAWFLAG_NORMAL           = 0;
201 float DRAWFLAG_ADDITIVE         = 1;
202 float DRAWFLAG_MODULATE         = 2;
203 float DRAWFLAG_2XMODULATE   = 3;
204
205 ///////////////////////////
206 // null entity (actually it is the same like the world entity)
207
208 entity null_entity;
209
210 ///////////////////////////
211 // error constants
212
213 // file handling
214 float ERR_CANNOTOPEN                    = -1; // fopen
215 float ERR_NOTENOUGHFILEHANDLES  = -2; // fopen
216 float ERR_INVALIDMODE                   = -3; // fopen
217 float ERR_BADFILENAME                   = -4; // fopen
218
219 // drawing functions
220
221 float ERR_NULLSTRING                    = -1;
222 float ERR_BADDRAWFLAG                   = -2;
223 float ERR_BADSCALE                              = -3;
224 float ERR_BADSIZE                               = ERR_BADSCALE;
225 float ERR_NOTCACHED                             = -4;
226
227 /* not supported at the moment
228 ///////////////////////////
229 // os constants
230
231 float OS_WINDOWS        = 0;
232 float OS_LINUX          = 1;
233 float OS_MAC            = 2;
234 */
235