| 1 |
/* |
| 2 |
=========================================================================== |
| 3 |
Copyright (C) 2007 Open Arena Team |
| 4 |
|
| 5 |
This file is part of Open Arena. |
| 6 |
|
| 7 |
Open Arena is free software; you can redistribute it |
| 8 |
and/or modify it under the terms of the GNU General Public License as |
| 9 |
published by the Free Software Foundation; either version 2 of the License, |
| 10 |
or (at your option) any later version. |
| 11 |
|
| 12 |
Open Arena is distributed in the hope that it will be |
| 13 |
useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with Open Arena; if not, write to the Free Software |
| 19 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 |
=========================================================================== |
| 21 |
*/ |
| 22 |
|
| 23 |
#include "ui/menudef.h" |
| 24 |
|
| 25 |
// classic H*L style menu |
| 26 |
|
| 27 |
{ |
| 28 |
menuDef { |
| 29 |
name "controls" |
| 30 |
visible 0 |
| 31 |
fullscreen 1 |
| 32 |
background MP_BACKGROUND |
| 33 |
focusColor MP_FOCUSCOLOR |
| 34 |
rect 0 0 640 480 |
| 35 |
outOfBoundsClick |
| 36 |
style 0 |
| 37 |
onOpen { } |
| 38 |
onEsc { |
| 39 |
close controls; |
| 40 |
open configuration; |
| 41 |
} |
| 42 |
|
| 43 |
itemDef { |
| 44 |
name titleness |
| 45 |
text "Controls" |
| 46 |
style 0 |
| 47 |
type 0 |
| 48 |
textstyle 6 |
| 49 |
textscale 1 |
| 50 |
rect 0 65 1 1 |
| 51 |
textalign 0 |
| 52 |
textalignx 48 |
| 53 |
textaligny 40 |
| 54 |
forecolor MP_TITLECOLOR |
| 55 |
visible 1 |
| 56 |
} |
| 57 |
|
| 58 |
// The Bar of Buttons |
| 59 |
|
| 60 |
itemDef { |
| 61 |
name button2 |
| 62 |
text "Done" |
| 63 |
style 0 |
| 64 |
type 1 |
| 65 |
textstyle 3 |
| 66 |
textscale 0.3 |
| 67 |
rect 52 177 163 34 |
| 68 |
textalign 0 |
| 69 |
textalignx 5 |
| 70 |
textaligny 20 |
| 71 |
forecolor MP_TEXTCOLOR |
| 72 |
visible 1 |
| 73 |
action |
| 74 |
{ |
| 75 |
play "ui/assets/select.wav"; |
| 76 |
open configuration; |
| 77 |
close controls; |
| 78 |
} |
| 79 |
} |
| 80 |
|
| 81 |
// Movement Group |
| 82 |
|
| 83 |
itemDef { |
| 84 |
name looking |
| 85 |
style 0 |
| 86 |
group movements |
| 87 |
text "Aiming" |
| 88 |
textstyle 6 |
| 89 |
textscale .25 |
| 90 |
rect 215 332 116 12 |
| 91 |
textalign 0 |
| 92 |
textalignx 0 |
| 93 |
textaligny 10 |
| 94 |
forecolor MP_TEXTCOLOR |
| 95 |
visible 1 |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
itemDef { |
| 101 |
name looking |
| 102 |
style 0 |
| 103 |
group movements |
| 104 |
text "Turn Left: " |
| 105 |
type ITEM_TYPE_BIND |
| 106 |
cvar "+left" |
| 107 |
textstyle 6 |
| 108 |
textscale .20 |
| 109 |
rect 215 376 116 12 |
| 110 |
textalign 0 |
| 111 |
textalignx 0 |
| 112 |
textaligny 10 |
| 113 |
forecolor MP_TEXTCOLOR |
| 114 |
visible 1 |
| 115 |
} |
| 116 |
|
| 117 |
itemDef { |
| 118 |
name looking |
| 119 |
style 0 |
| 120 |
group movements |
| 121 |
text "Turn Right: " |
| 122 |
type ITEM_TYPE_BIND |
| 123 |
cvar "+right" |
| 124 |
textstyle 6 |
| 125 |
textscale .20 |
| 126 |
rect 215 388 116 12 |
| 127 |
textalign 0 |
| 128 |
textalignx 0 |
| 129 |
textaligny 10 |
| 130 |
forecolor MP_TEXTCOLOR |
| 131 |
visible 1 |
| 132 |
} |
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
itemDef { |
| 137 |
name looking |
| 138 |
style 0 |
| 139 |
group movements |
| 140 |
text "Look Up: " |
| 141 |
type ITEM_TYPE_BIND |
| 142 |
cvar "+lookup" |
| 143 |
textstyle 6 |
| 144 |
textscale .20 |
| 145 |
rect 215 400 116 12 |
| 146 |
textalign 0 |
| 147 |
textalignx 0 |
| 148 |
textaligny 10 |
| 149 |
forecolor MP_TEXTCOLOR |
| 150 |
visible 1 |
| 151 |
} |
| 152 |
|
| 153 |
|
| 154 |
itemDef { |
| 155 |
name looking |
| 156 |
style 0 |
| 157 |
group movements |
| 158 |
text "Look Down: " |
| 159 |
type ITEM_TYPE_BIND |
| 160 |
cvar "+lookdown" |
| 161 |
textstyle 6 |
| 162 |
textscale .20 |
| 163 |
rect 215 412 116 12 |
| 164 |
textalign 0 |
| 165 |
textalignx 0 |
| 166 |
textaligny 10 |
| 167 |
forecolor MP_TEXTCOLOR |
| 168 |
visible 1 |
| 169 |
} |
| 170 |
|
| 171 |
itemDef { |
| 172 |
name looking |
| 173 |
style 0 |
| 174 |
group movements |
| 175 |
text "Center View: " |
| 176 |
type ITEM_TYPE_BIND |
| 177 |
cvar "centerview" |
| 178 |
textstyle 6 |
| 179 |
textscale .20 |
| 180 |
rect 215 424 116 12 |
| 181 |
textalign 0 |
| 182 |
textalignx 0 |
| 183 |
textaligny 10 |
| 184 |
forecolor MP_TEXTCOLOR |
| 185 |
visible 1 |
| 186 |
} |
| 187 |
|
| 188 |
itemDef { |
| 189 |
name looking |
| 190 |
style 0 |
| 191 |
group movements |
| 192 |
text "Zoom: " |
| 193 |
type ITEM_TYPE_BIND |
| 194 |
cvar "+zoom" |
| 195 |
textstyle 6 |
| 196 |
textscale .20 |
| 197 |
rect 215 436 116 12 |
| 198 |
textalign 0 |
| 199 |
textalignx 0 |
| 200 |
textaligny 10 |
| 201 |
forecolor MP_TEXTCOLOR |
| 202 |
visible 1 |
| 203 |
} |
| 204 |
|
| 205 |
itemDef { |
| 206 |
name looking |
| 207 |
style 0 |
| 208 |
group movements |
| 209 |
text "Mouse look (hold): " |
| 210 |
type ITEM_TYPE_BIND |
| 211 |
cvar "+mlook" |
| 212 |
textstyle 6 |
| 213 |
textscale .20 |
| 214 |
rect 215 448 116 12 |
| 215 |
textalign 0 |
| 216 |
textalignx 0 |
| 217 |
textaligny 10 |
| 218 |
forecolor MP_TEXTCOLOR |
| 219 |
visible 1 |
| 220 |
} |
| 221 |
|
| 222 |
itemDef { |
| 223 |
name looking |
| 224 |
style 0 |
| 225 |
group movements |
| 226 |
text "Free Look: " |
| 227 |
type ITEM_TYPE_YESNO |
| 228 |
cvar "cl_freelook" |
| 229 |
textstyle 6 |
| 230 |
textscale .20 |
| 231 |
rect 215 460 116 12 |
| 232 |
textalign 0 |
| 233 |
textalignx 0 |
| 234 |
textaligny 10 |
| 235 |
forecolor MP_TEXTCOLOR |
| 236 |
visible 1 |
| 237 |
} |
| 238 |
|
| 239 |
// Movement |
| 240 |
|
| 241 |
itemDef { |
| 242 |
name looking |
| 243 |
style 0 |
| 244 |
group movements |
| 245 |
text "Movement" |
| 246 |
textstyle 6 |
| 247 |
textscale .25 |
| 248 |
rect 415 378 116 12 |
| 249 |
textalign 0 |
| 250 |
textalignx 0 |
| 251 |
textaligny 10 |
| 252 |
forecolor MP_TEXTCOLOR |
| 253 |
visible 1 |
| 254 |
} |
| 255 |
|
| 256 |
itemDef { |
| 257 |
name looking |
| 258 |
style 0 |
| 259 |
group movements |
| 260 |
text "Forward: " |
| 261 |
type ITEM_TYPE_BIND |
| 262 |
cvar "+forward" |
| 263 |
textstyle 6 |
| 264 |
textscale .20 |
| 265 |
rect 415 400 116 12 |
| 266 |
textalign 0 |
| 267 |
textalignx 0 |
| 268 |
textaligny 10 |
| 269 |
forecolor MP_TEXTCOLOR |
| 270 |
visible 1 |
| 271 |
} |
| 272 |
|
| 273 |
itemDef { |
| 274 |
name looking |
| 275 |
style 0 |
| 276 |
group movements |
| 277 |
text "Backpedal: " |
| 278 |
type ITEM_TYPE_BIND |
| 279 |
cvar "+back" |
| 280 |
textstyle 6 |
| 281 |
textscale .20 |
| 282 |
rect 415 412 116 12 |
| 283 |
textalign 0 |
| 284 |
textalignx 0 |
| 285 |
textaligny 10 |
| 286 |
forecolor MP_TEXTCOLOR |
| 287 |
visible 1 |
| 288 |
} |
| 289 |
|
| 290 |
itemDef { |
| 291 |
name looking |
| 292 |
style 0 |
| 293 |
group movements |
| 294 |
text "Strafe Left: " |
| 295 |
type ITEM_TYPE_BIND |
| 296 |
cvar "+moveleft" |
| 297 |
textstyle 6 |
| 298 |
textscale .20 |
| 299 |
rect 415 424 116 12 |
| 300 |
textalign 0 |
| 301 |
textalignx 0 |
| 302 |
textaligny 10 |
| 303 |
forecolor MP_TEXTCOLOR |
| 304 |
visible 1 |
| 305 |
} |
| 306 |
|
| 307 |
itemDef { |
| 308 |
name looking |
| 309 |
style 0 |
| 310 |
group movements |
| 311 |
text "Strafe Right: " |
| 312 |
type ITEM_TYPE_BIND |
| 313 |
cvar "+moveright" |
| 314 |
textstyle 6 |
| 315 |
textscale .20 |
| 316 |
rect 415 436 116 12 |
| 317 |
textalign 0 |
| 318 |
textalignx 0 |
| 319 |
textaligny 10 |
| 320 |
forecolor MP_TEXTCOLOR |
| 321 |
visible 1 |
| 322 |
} |
| 323 |
itemDef { |
| 324 |
name looking |
| 325 |
style 0 |
| 326 |
group movements |
| 327 |
text "Jump: " |
| 328 |
type ITEM_TYPE_BIND |
| 329 |
cvar "+moveup" |
| 330 |
textstyle 6 |
| 331 |
textscale .20 |
| 332 |
rect 415 448 116 12 |
| 333 |
textalign 0 |
| 334 |
textalignx 0 |
| 335 |
textaligny 10 |
| 336 |
forecolor MP_TEXTCOLOR |
| 337 |
visible 1 |
| 338 |
} |
| 339 |
|
| 340 |
itemDef { |
| 341 |
name looking |
| 342 |
style 0 |
| 343 |
group movements |
| 344 |
text "Crouch: " |
| 345 |
type ITEM_TYPE_BIND |
| 346 |
cvar "+movedown" |
| 347 |
textstyle 6 |
| 348 |
textscale .20 |
| 349 |
rect 415 460 116 12 |
| 350 |
textalign 0 |
| 351 |
textalignx 0 |
| 352 |
textaligny 10 |
| 353 |
forecolor MP_TEXTCOLOR |
| 354 |
visible 1 |
| 355 |
} |
| 356 |
|
| 357 |
itemDef { |
| 358 |
name looking |
| 359 |
style 0 |
| 360 |
group movements |
| 361 |
text "Turn Left: " |
| 362 |
type ITEM_TYPE_BIND |
| 363 |
cvar "+left" |
| 364 |
textstyle 6 |
| 365 |
textscale .20 |
| 366 |
rect 531 400 116 12 |
| 367 |
textalign 0 |
| 368 |
textalignx 0 |
| 369 |
textaligny 10 |
| 370 |
forecolor MP_TEXTCOLOR |
| 371 |
visible 1 |
| 372 |
} |
| 373 |
|
| 374 |
itemDef { |
| 375 |
name looking |
| 376 |
style 0 |
| 377 |
group movements |
| 378 |
text "Strafe: " |
| 379 |
type ITEM_TYPE_BIND |
| 380 |
cvar "+strafe" |
| 381 |
textstyle 6 |
| 382 |
textscale .20 |
| 383 |
rect 531 424 116 12 |
| 384 |
textalign 0 |
| 385 |
textalignx 0 |
| 386 |
textaligny 10 |
| 387 |
forecolor MP_TEXTCOLOR |
| 388 |
visible 1 |
| 389 |
} |
| 390 |
} |