| 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 "videomodes" |
| 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 videomodes; |
| 40 |
open configuration; |
| 41 |
} |
| 42 |
|
| 43 |
itemDef { |
| 44 |
name titleness |
| 45 |
text "Video Modes" |
| 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 button1 |
| 62 |
text "Apply" |
| 63 |
style 0 |
| 64 |
type 1 |
| 65 |
textstyle 3 |
| 66 |
textscale 0.3 |
| 67 |
rect 52 145 163 34 |
| 68 |
textalign 0 |
| 69 |
textalignx 5 |
| 70 |
textaligny 20 |
| 71 |
backcolor 0 0 0 0 |
| 72 |
forecolor MP_TEXTCOLOR |
| 73 |
visible 1 |
| 74 |
action |
| 75 |
{ |
| 76 |
play "ui/assets/select.wav"; |
| 77 |
exec "vid_restart"; |
| 78 |
open configuration; |
| 79 |
close videomodes; |
| 80 |
} |
| 81 |
} |
| 82 |
|
| 83 |
itemDef { |
| 84 |
name button2 |
| 85 |
text "Done" |
| 86 |
style 0 |
| 87 |
type 1 |
| 88 |
textstyle 3 |
| 89 |
textscale 0.3 |
| 90 |
rect 52 177 163 34 |
| 91 |
textalign 0 |
| 92 |
textalignx 5 |
| 93 |
textaligny 20 |
| 94 |
forecolor MP_TEXTCOLOR |
| 95 |
visible 1 |
| 96 |
action |
| 97 |
{ |
| 98 |
play "ui/assets/select.wav"; |
| 99 |
open configuration; |
| 100 |
close videomodes; |
| 101 |
} |
| 102 |
} |
| 103 |
// the audio controls |
| 104 |
|
| 105 |
itemDef { |
| 106 |
name volume |
| 107 |
style 0 |
| 108 |
text "Quality:" |
| 109 |
style 0 |
| 110 |
type 0 |
| 111 |
textstyle 6 |
| 112 |
textscale .25 |
| 113 |
rect 212 137 1 1 |
| 114 |
textalign 0 |
| 115 |
textalignx 6 |
| 116 |
textaligny 18 |
| 117 |
forecolor MP_TEXTCOLOR |
| 118 |
visible 1 |
| 119 |
} |
| 120 |
/* |
| 121 |
itemDef { |
| 122 |
name settin |
| 123 |
style 0 |
| 124 |
type ITEM_TYPE_MULTI |
| 125 |
text "" |
| 126 |
cvar "ui_glCustom" |
| 127 |
cvarFloatList { "High" 0 "Medium" 1 "Low" 2 "Really Low" 3 "Custom" 4 } |
| 128 |
text "" |
| 129 |
background "ui/assets/scrollbar" |
| 130 |
textstyle 6 |
| 131 |
textscale .24 |
| 132 |
rect 212 166 150 24 |
| 133 |
textalign 0 |
| 134 |
textalignx 6 |
| 135 |
textaligny 18 |
| 136 |
forecolor 1 1 1 1 |
| 137 |
backcolor 0.0 0.0 0.0 1 |
| 138 |
outlinecolor 1 0.5 0.01 0.3 |
| 139 |
visible 1 |
| 140 |
} |
| 141 |
|
| 142 |
*/ |
| 143 |
// MAX PRAYERS |
| 144 |
itemDef { |
| 145 |
name maxprayamer |
| 146 |
style 0 |
| 147 |
text "Screen resolution:" |
| 148 |
style 0 |
| 149 |
type 0 |
| 150 |
textstyle 6 |
| 151 |
textscale .25 |
| 152 |
rect 212 200 1 1 |
| 153 |
textalign 0 |
| 154 |
textalignx 6 |
| 155 |
textaligny 18 |
| 156 |
forecolor MP_TEXTCOLOR |
| 157 |
visible 1 |
| 158 |
} |
| 159 |
itemDef { |
| 160 |
name mussic |
| 161 |
style 0 |
| 162 |
type ITEM_TYPE_MULTI |
| 163 |
text "" |
| 164 |
cvar "r_mode" |
| 165 |
cvarFloatList { "320*240" 0 "400*300" 1 "512*384" 2 "640*480" 3 "800*600" 4 "960*720" 5 "1024*768" 6 "1152*864" 7 "1280*1024" 8 "1600*1200" 9 "2048*1536" 10 "856*480" 11 "Custom defined" -1 } |
| 166 |
background "ui/assets/scrollbar" |
| 167 |
textstyle 6 |
| 168 |
textscale .24 |
| 169 |
rect 212 229 150 24 |
| 170 |
textalign 0 |
| 171 |
textalignx 6 |
| 172 |
textaligny 18 |
| 173 |
|
| 174 |
forecolor MP_TEXTCOLOR |
| 175 |
backcolor 0.0 0.0 0.0 1 |
| 176 |
outlinecolor 1 0.5 0.01 0.3 |
| 177 |
visible 1 |
| 178 |
} |
| 179 |
// other buttons |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
itemDef { |
| 184 |
name yourmother |
| 185 |
style 0 |
| 186 |
text "Texture Detail:" |
| 187 |
type ITEM_TYPE_MULTI |
| 188 |
cvar "r_picmip" |
| 189 |
cvarFloatList { "Low" 2 "Medium" 1 "High" 0 } |
| 190 |
textstyle 6 |
| 191 |
textscale .24 |
| 192 |
rect 212 287 150 24 |
| 193 |
textalign 0 |
| 194 |
textalignx 6 |
| 195 |
textaligny 18 |
| 196 |
forecolor MP_TEXTCOLOR |
| 197 |
visible 1 |
| 198 |
} |
| 199 |
|
| 200 |
itemDef { |
| 201 |
name shadows |
| 202 |
style 0 |
| 203 |
text "Shadows: " |
| 204 |
type ITEM_TYPE_MULTI |
| 205 |
cvar "cg_shadows" |
| 206 |
cvarFloatList { "Blob" 1 "Volumetric" 2 "Planar" 3 } |
| 207 |
textstyle 6 |
| 208 |
textscale .24 |
| 209 |
rect 54 287 116 24 |
| 210 |
textalign 0 |
| 211 |
textalignx 6 |
| 212 |
textaligny 20 |
| 213 |
forecolor MP_TEXTCOLOR |
| 214 |
visible 1 |
| 215 |
action { uiScript glCustom } |
| 216 |
} |
| 217 |
|
| 218 |
|
| 219 |
// other buttons |
| 220 |
|
| 221 |
itemDef { |
| 222 |
name frares |
| 223 |
style 0 |
| 224 |
text "Fullscreen:" |
| 225 |
cvar "r_fullscreen" |
| 226 |
style 0 |
| 227 |
type ITEM_TYPE_YESNO |
| 228 |
textstyle 6 |
| 229 |
textscale .22 |
| 230 |
rect 54 316 117 24 |
| 231 |
textalign 0 |
| 232 |
textalignx 6 |
| 233 |
textaligny 20 |
| 234 |
forecolor MP_TEXTCOLOR |
| 235 |
visible 1 |
| 236 |
action { uiScript glCustom } |
| 237 |
} |
| 238 |
|
| 239 |
itemDef { |
| 240 |
name pure |
| 241 |
style 0 |
| 242 |
text "GL Extensions:" |
| 243 |
cvar "r_allowExtensions" |
| 244 |
style 0 |
| 245 |
type ITEM_TYPE_YESNO |
| 246 |
textstyle 6 |
| 247 |
textscale .22 |
| 248 |
rect 54 340 116 24 |
| 249 |
textalign 0 |
| 250 |
textalignx 6 |
| 251 |
textaligny 20 |
| 252 |
forecolor MP_TEXTCOLOR |
| 253 |
visible 1 |
| 254 |
action { uiScript glCustom } |
| 255 |
} |
| 256 |
itemDef { |
| 257 |
name ded |
| 258 |
style 0 |
| 259 |
text "Color Depth:" |
| 260 |
style 0 |
| 261 |
type ITEM_TYPE_MULTI |
| 262 |
cvar "r_colorBits" |
| 263 |
cvarFloatList { "Desktop" 0 "16bpp" 16 "24bpp" 24 "32bpp" 32 } |
| 264 |
textstyle 6 |
| 265 |
textscale .22 |
| 266 |
rect 54 364 116 24 |
| 267 |
textalign 0 |
| 268 |
textalignx 6 |
| 269 |
textaligny 20 |
| 270 |
forecolor MP_TEXTCOLOR |
| 271 |
visible 1 |
| 272 |
action { uiScript glCustom } |
| 273 |
} |
| 274 |
|
| 275 |
// row 2 of other buttons |
| 276 |
|
| 277 |
itemDef { |
| 278 |
name fraglimit |
| 279 |
text "Multitexturing:" |
| 280 |
style 0 |
| 281 |
type ITEM_TYPE_MULTI |
| 282 |
|
| 283 |
cvar "r_vertexLight" |
| 284 |
cvarFloatList { "Yes" 0 "No" 1 } |
| 285 |
textstyle 6 |
| 286 |
textscale .22 |
| 287 |
rect 215 316 117 24 |
| 288 |
|
| 289 |
textalign 0 |
| 290 |
textalignx 6 |
| 291 |
textaligny 20 |
| 292 |
forecolor MP_TEXTCOLOR |
| 293 |
visible 1 |
| 294 |
action { uiScript glCustom } |
| 295 |
} |
| 296 |
|
| 297 |
itemDef { |
| 298 |
name timelimit |
| 299 |
text "Model Detail:" |
| 300 |
style 0 |
| 301 |
type ITEM_TYPE_MULTI |
| 302 |
cvar "r_lodBias" |
| 303 |
cvarFloatList { "Insane" -50 "High" 0 "Medium" 1 "Low" 2 "Minimum" 50} |
| 304 |
textstyle 6 |
| 305 |
textscale .22 |
| 306 |
rect 215 340 116 24 |
| 307 |
textalign 0 |
| 308 |
textalignx 6 |
| 309 |
textaligny 20 |
| 310 |
forecolor MP_TEXTCOLOR |
| 311 |
action { |
| 312 |
uiScript glCustom ; uiScript update "r_lodbias" |
| 313 |
} |
| 314 |
visible 1 |
| 315 |
} |
| 316 |
itemDef { |
| 317 |
name caplimit |
| 318 |
text "Texture filter:" |
| 319 |
type ITEM_TYPE_MULTI |
| 320 |
cvar "r_texturemode" |
| 321 |
cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR" } |
| 322 |
style 0 |
| 323 |
maxchars 5 |
| 324 |
textstyle 6 |
| 325 |
textscale .22 |
| 326 |
textstyle 6 |
| 327 |
textscale .22 |
| 328 |
rect 215 364 116 24 |
| 329 |
textalign 0 |
| 330 |
textalignx 6 |
| 331 |
textaligny 20 |
| 332 |
forecolor MP_TEXTCOLOR |
| 333 |
visible 1 |
| 334 |
} |
| 335 |
|
| 336 |
itemDef { |
| 337 |
name minplayers |
| 338 |
text "Flares:" |
| 339 |
cvar "r_flares" |
| 340 |
style 0 |
| 341 |
type ITEM_TYPE_YESNO |
| 342 |
maxchars 2 |
| 343 |
textstyle 6 |
| 344 |
textscale .22 |
| 345 |
textstyle 6 |
| 346 |
textscale .22 |
| 347 |
rect 215 388 116 24 |
| 348 |
textalign 0 |
| 349 |
textalignx 6 |
| 350 |
action { uiScript glCustom } |
| 351 |
textaligny 20 |
| 352 |
forecolor MP_TEXTCOLOR |
| 353 |
visible 1 |
| 354 |
} |
| 355 |
|
| 356 |
itemDef { |
| 357 |
name bloom |
| 358 |
text "Bloom:" |
| 359 |
cvar "r_bloom" |
| 360 |
style 0 |
| 361 |
type ITEM_TYPE_YESNO |
| 362 |
maxchars 2 |
| 363 |
textstyle 6 |
| 364 |
textscale .22 |
| 365 |
textstyle 6 |
| 366 |
textscale .22 |
| 367 |
rect 54 412 116 24 |
| 368 |
textalign 0 |
| 369 |
textalignx 6 |
| 370 |
action { uiScript glCustom } |
| 371 |
textaligny 20 |
| 372 |
forecolor MP_TEXTCOLOR |
| 373 |
visible 1 |
| 374 |
} |
| 375 |
|
| 376 |
itemDef { |
| 377 |
name minfayers |
| 378 |
text "Detail Texturing:" |
| 379 |
cvar "r_detailTextures" |
| 380 |
style 0 |
| 381 |
type ITEM_TYPE_YESNO |
| 382 |
maxchars 2 |
| 383 |
textstyle 6 |
| 384 |
textscale .22 |
| 385 |
textstyle 6 |
| 386 |
textscale .22 |
| 387 |
rect 54 388 116 24 |
| 388 |
textalign 0 |
| 389 |
textalignx 6 |
| 390 |
textaligny 20 |
| 391 |
forecolor MP_TEXTCOLOR |
| 392 |
visible 1 |
| 393 |
} |
| 394 |
|
| 395 |
itemDef { |
| 396 |
name stencilbuffer |
| 397 |
style 0 |
| 398 |
text "Stencil Buffer: " |
| 399 |
type ITEM_TYPE_MULTI |
| 400 |
cvar "r_stencilbits" |
| 401 |
cvarFloatList { "None" 0 "Medium" 2 "High" 8 } |
| 402 |
textstyle 6 |
| 403 |
textscale .22 |
| 404 |
rect 215 412 116 24 |
| 405 |
textalign 0 |
| 406 |
textalignx 6 |
| 407 |
action { uiScript glCustom; uiScript update "r_stencilbits" } |
| 408 |
textaligny 20 |
| 409 |
forecolor MP_TEXTCOLOR |
| 410 |
visible 1 |
| 411 |
} |
| 412 |
|
| 413 |
|
| 414 |
} |