| 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 |
{ |
| 26 |
|
| 27 |
menuDef { |
| 28 |
name "createserver" |
| 29 |
visible 0 |
| 30 |
fullscreen 1 |
| 31 |
background MP_BACKGROUND |
| 32 |
focusColor MP_FOCUSCOLOR |
| 33 |
rect 0 0 640 480 |
| 34 |
outOfBoundsClick |
| 35 |
style 0 |
| 36 |
onOpen { |
| 37 |
uiScript loadArenas; |
| 38 |
} |
| 39 |
onEsc { |
| 40 |
close createserver; |
| 41 |
open main; |
| 42 |
} |
| 43 |
|
| 44 |
itemDef { |
| 45 |
name titleness |
| 46 |
text "Create Game" |
| 47 |
style 0 |
| 48 |
type 0 |
| 49 |
textstyle 6 |
| 50 |
textscale 1 |
| 51 |
rect 0 65 1 1 |
| 52 |
textalign 0 |
| 53 |
textalignx 48 |
| 54 |
textaligny 40 |
| 55 |
forecolor MP_TITLECOLOR |
| 56 |
visible 1 |
| 57 |
} |
| 58 |
|
| 59 |
itemDef { |
| 60 |
name advoptions |
| 61 |
text "Adv Options" |
| 62 |
style 0 |
| 63 |
type 1 |
| 64 |
textstyle 3 |
| 65 |
textscale 0.3 |
| 66 |
rect 52 145 163 34 |
| 67 |
textalign 0 |
| 68 |
textalignx 5 |
| 69 |
textaligny 20 |
| 70 |
backcolor 0 0 0 0 |
| 71 |
forecolor MP_TEXTCOLOR |
| 72 |
visible 1 |
| 73 |
action { |
| 74 |
play MP_SND_SELECT; |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
itemDef { |
| 79 |
name button2 |
| 80 |
text "Ok" |
| 81 |
style 0 |
| 82 |
type 1 |
| 83 |
textstyle 3 |
| 84 |
textscale 0.3 |
| 85 |
rect 52 177 163 34 |
| 86 |
textalign 0 |
| 87 |
textalignx 5 |
| 88 |
textaligny 20 |
| 89 |
forecolor MP_TEXTCOLOR |
| 90 |
visible 1 |
| 91 |
action |
| 92 |
{ |
| 93 |
play MP_SND_SELECT; |
| 94 |
uiScript StartServer // let's get it started |
| 95 |
} |
| 96 |
} |
| 97 |
|
| 98 |
itemDef { |
| 99 |
name button3 |
| 100 |
text "Cancel" |
| 101 |
style 0 |
| 102 |
type 1 |
| 103 |
textstyle 3 |
| 104 |
textscale 0.3 |
| 105 |
rect 52 209 163 34 |
| 106 |
textalign 0 |
| 107 |
textalignx 5 |
| 108 |
textaligny 20 |
| 109 |
forecolor MP_TEXTCOLOR |
| 110 |
visible 1 |
| 111 |
action |
| 112 |
{ |
| 113 |
play MP_SND_SELECT; |
| 114 |
close createserver; |
| 115 |
open menu; |
| 116 |
} |
| 117 |
} |
| 118 |
|
| 119 |
itemDef { |
| 120 |
name maplist |
| 121 |
rect 382 174 208 288 |
| 122 |
type ITEM_TYPE_LISTBOX |
| 123 |
style WINDOW_STYLE_FILLED |
| 124 |
elementwidth 100 |
| 125 |
elementheight 14 |
| 126 |
textscale .20 |
| 127 |
elementtype LISTBOX_TEXT |
| 128 |
feeder FEEDER_ALLMAPS |
| 129 |
textalign 0 |
| 130 |
background "ui/assets/scrollbar" |
| 131 |
textaligny 14 |
| 132 |
border 1 |
| 133 |
bordercolor MP_BOX_BORDER |
| 134 |
forecolor MP_BOX_FORE |
| 135 |
backcolor MP_BOX_BACK |
| 136 |
outlinecolor MP_BOX_OUTLINE |
| 137 |
visible 1 |
| 138 |
columns 1 |
| 139 |
2 190 25 |
| 140 |
doubleClick { uiscript StartServer } |
| 141 |
} |
| 142 |
|
| 143 |
// map preview... |
| 144 |
|
| 145 |
itemDef { |
| 146 |
name mappreview |
| 147 |
style WINDOW_STYLE_FILLED |
| 148 |
ownerdraw UI_STARTMAPCINEMATIC |
| 149 |
rect 437 30 160 120 |
| 150 |
border 1 |
| 151 |
bordercolor MP_BOX_BORDER |
| 152 |
visible 1 |
| 153 |
} |
| 154 |
|
| 155 |
itemDef { |
| 156 |
name mappreviewtext |
| 157 |
text "Map:" |
| 158 |
style 0 |
| 159 |
type 0 |
| 160 |
textstyle 6 |
| 161 |
textscale .237 |
| 162 |
rect 382 116 1 1 |
| 163 |
textalign 0 |
| 164 |
textalignx 6 |
| 165 |
textaligny 0 |
| 166 |
forecolor MP_BOX_HEADERCOLOR |
| 167 |
visible 1 |
| 168 |
} |
| 169 |
|
| 170 |
// SERVER NAME |
| 171 |
itemDef { |
| 172 |
name hostnamer |
| 173 |
style 0 |
| 174 |
text "Server Name:" |
| 175 |
style 0 |
| 176 |
type 0 |
| 177 |
textstyle 6 |
| 178 |
textscale .25 |
| 179 |
rect 212 137 1 1 |
| 180 |
textalign 0 |
| 181 |
textalignx 6 |
| 182 |
textaligny 18 |
| 183 |
forecolor MP_BOX_HEADERCOLOR |
| 184 |
visible 1 |
| 185 |
} |
| 186 |
|
| 187 |
itemDef { |
| 188 |
name settin |
| 189 |
style WINDOW_STYLE_FILLED |
| 190 |
type ITEM_TYPE_EDITFIELD |
| 191 |
text "" |
| 192 |
cvar "sv_hostname" |
| 193 |
maxChars 32 |
| 194 |
maxPaintChars 10 |
| 195 |
background "ui/assets/scrollbar" |
| 196 |
textstyle 6 |
| 197 |
textscale .24 |
| 198 |
rect 212 166 150 24 |
| 199 |
textalign 0 |
| 200 |
textalignx 6 |
| 201 |
textaligny 18 |
| 202 |
border 1 |
| 203 |
bordercolor MP_BOX_BORDER |
| 204 |
forecolor MP_BOX_FORE |
| 205 |
backcolor MP_BOX_BACK |
| 206 |
outlinecolor MP_BOX_OUTLINE |
| 207 |
visible 1 |
| 208 |
} |
| 209 |
|
| 210 |
|
| 211 |
// MAX PRAYERS |
| 212 |
itemDef { |
| 213 |
name maxprayamer |
| 214 |
style 0 |
| 215 |
text "Max. Players:" |
| 216 |
style 0 |
| 217 |
type 0 |
| 218 |
textstyle 6 |
| 219 |
textscale .25 |
| 220 |
rect 212 200 1 1 |
| 221 |
textalign 0 |
| 222 |
textalignx 6 |
| 223 |
textaligny 18 |
| 224 |
forecolor MP_BOX_HEADERCOLOR |
| 225 |
visible 1 |
| 226 |
} |
| 227 |
|
| 228 |
itemDef { |
| 229 |
name settin2 |
| 230 |
style WINDOW_STYLE_FILLED |
| 231 |
type ITEM_TYPE_EDITFIELD |
| 232 |
text "" |
| 233 |
cvar "sv_maxclients" |
| 234 |
maxChars 32 |
| 235 |
maxPaintChars 10 |
| 236 |
background "ui/assets/scrollbar" |
| 237 |
textstyle 6 |
| 238 |
maxchars 4 |
| 239 |
textscale .24 |
| 240 |
rect 212 229 150 24 |
| 241 |
textalign 0 |
| 242 |
textalignx 6 |
| 243 |
textaligny 18 |
| 244 |
border 1 |
| 245 |
bordercolor MP_BOX_BORDER |
| 246 |
forecolor MP_BOX_FORE |
| 247 |
backcolor MP_BOX_BACK |
| 248 |
outlinecolor MP_BOX_OUTLINE |
| 249 |
visible 1 |
| 250 |
} |
| 251 |
// other buttons |
| 252 |
|
| 253 |
|
| 254 |
// PASS WORLD |
| 255 |
itemDef { |
| 256 |
name password |
| 257 |
style 0 |
| 258 |
text "Passwoid:" |
| 259 |
style 0 |
| 260 |
type 0 |
| 261 |
textstyle 6 |
| 262 |
textscale .25 |
| 263 |
rect 212 263 1 1 |
| 264 |
textalign 0 |
| 265 |
textalignx 6 |
| 266 |
textaligny 18 |
| 267 |
forecolor MP_BOX_HEADERCOLOR |
| 268 |
visible 1 |
| 269 |
} |
| 270 |
itemDef { |
| 271 |
name settin2 |
| 272 |
style WINDOW_STYLE_FILLED |
| 273 |
type ITEM_TYPE_EDITFIELD |
| 274 |
text "" |
| 275 |
cvar "g_password" |
| 276 |
maxChars 10 |
| 277 |
maxPaintChars 10 |
| 278 |
background "ui/assets/scrollbar" |
| 279 |
textstyle 6 |
| 280 |
textscale .24 |
| 281 |
rect 212 287 150 24 |
| 282 |
textalign 0 |
| 283 |
textalignx 6 |
| 284 |
textaligny 18 |
| 285 |
border 1 |
| 286 |
bordercolor MP_BOX_BORDER |
| 287 |
forecolor MP_BOX_FORE |
| 288 |
backcolor MP_BOX_BACK |
| 289 |
outlinecolor MP_BOX_OUTLINE |
| 290 |
visible 1 |
| 291 |
} |
| 292 |
// other buttons |
| 293 |
|
| 294 |
itemDef { |
| 295 |
name friendly |
| 296 |
style 0 |
| 297 |
text "Friendly Fire:" |
| 298 |
cvar "g_friendlyfire" |
| 299 |
style 0 |
| 300 |
type ITEM_TYPE_YESNO |
| 301 |
textstyle 6 |
| 302 |
textscale .22 |
| 303 |
rect 54 316 117 24 |
| 304 |
textalign 0 |
| 305 |
textalignx 6 |
| 306 |
textaligny 20 |
| 307 |
forecolor MP_SMALLCOLOR |
| 308 |
visible 1 |
| 309 |
} |
| 310 |
|
| 311 |
itemDef { |
| 312 |
name pure |
| 313 |
style 0 |
| 314 |
text "Pure Server:" |
| 315 |
cvar "sv_pure" |
| 316 |
style 0 |
| 317 |
type ITEM_TYPE_YESNO |
| 318 |
textstyle 6 |
| 319 |
textscale .22 |
| 320 |
rect 54 340 116 24 |
| 321 |
textalign 0 |
| 322 |
textalignx 6 |
| 323 |
textaligny 20 |
| 324 |
forecolor MP_SMALLCOLOR |
| 325 |
visible 1 |
| 326 |
} |
| 327 |
|
| 328 |
itemDef { |
| 329 |
name ded |
| 330 |
style 0 |
| 331 |
type ITEM_TYPE_MULTI |
| 332 |
text "Dedicated:" |
| 333 |
cvar "sv_pure" |
| 334 |
cvar "ui_dedicated" |
| 335 |
cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 } |
| 336 |
textstyle 6 |
| 337 |
textscale .22 |
| 338 |
rect 54 364 116 24 |
| 339 |
textalign 0 |
| 340 |
textalignx 6 |
| 341 |
textaligny 20 |
| 342 |
forecolor MP_SMALLCOLOR |
| 343 |
visible 1 |
| 344 |
} |
| 345 |
|
| 346 |
itemDef { |
| 347 |
name vamp |
| 348 |
type ITEM_TYPE_NUMERICFIELD |
| 349 |
text "Vampire:" |
| 350 |
cvar "g_vampire" |
| 351 |
style 0 |
| 352 |
maxchars 2 |
| 353 |
textstyle 6 |
| 354 |
textscale .22 |
| 355 |
textstyle 6 |
| 356 |
textscale .22 |
| 357 |
rect 54 388 116 24 |
| 358 |
textalign 0 |
| 359 |
textalignx 6 |
| 360 |
textaligny 20 |
| 361 |
forecolor MP_SMALLCOLOR |
| 362 |
visible 1 |
| 363 |
} |
| 364 |
|
| 365 |
itemDef { |
| 366 |
name instantgib |
| 367 |
style 0 |
| 368 |
text "Instant Gib:" |
| 369 |
cvar "g_instantgib" |
| 370 |
style 0 |
| 371 |
type ITEM_TYPE_YESNO |
| 372 |
textstyle 6 |
| 373 |
textscale .22 |
| 374 |
rect 54 412 117 24 |
| 375 |
textalign 0 |
| 376 |
textalignx 6 |
| 377 |
textaligny 20 |
| 378 |
forecolor MP_SMALLCOLOR |
| 379 |
visible 1 |
| 380 |
} |
| 381 |
// row 2 of other buttons |
| 382 |
|
| 383 |
itemDef { |
| 384 |
name fraglimit |
| 385 |
text "Fraglimit:" |
| 386 |
cvar "fraglimit" |
| 387 |
style 0 |
| 388 |
type ITEM_TYPE_NUMERICFIELD |
| 389 |
maxchars 5 |
| 390 |
textstyle 6 |
| 391 |
textscale .22 |
| 392 |
rect 215 316 117 24 |
| 393 |
textalign 0 |
| 394 |
textalignx 6 |
| 395 |
textaligny 20 |
| 396 |
forecolor MP_SMALLCOLOR |
| 397 |
visible 1 |
| 398 |
} |
| 399 |
|
| 400 |
itemDef { |
| 401 |
name timelimit |
| 402 |
text "Timelimit:" |
| 403 |
cvar "timelimit" |
| 404 |
style 0 |
| 405 |
type ITEM_TYPE_NUMERICFIELD |
| 406 |
maxchars 5 |
| 407 |
textstyle 6 |
| 408 |
textscale .22 |
| 409 |
rect 215 340 116 24 |
| 410 |
textalign 0 |
| 411 |
textalignx 6 |
| 412 |
textaligny 20 |
| 413 |
forecolor MP_SMALLCOLOR |
| 414 |
visible 1 |
| 415 |
} |
| 416 |
|
| 417 |
itemDef { |
| 418 |
name caplimit |
| 419 |
text "Capturelimit:" |
| 420 |
cvar "capturelimit" |
| 421 |
style 0 |
| 422 |
type ITEM_TYPE_NUMERICFIELD |
| 423 |
maxchars 5 |
| 424 |
textstyle 6 |
| 425 |
textscale .22 |
| 426 |
textstyle 6 |
| 427 |
textscale .22 |
| 428 |
rect 215 364 116 24 |
| 429 |
textalign 0 |
| 430 |
textalignx 6 |
| 431 |
textaligny 20 |
| 432 |
forecolor MP_SMALLCOLOR |
| 433 |
visible 1 |
| 434 |
} |
| 435 |
|
| 436 |
itemDef { |
| 437 |
name minplayers |
| 438 |
text "Minimum Players:" |
| 439 |
cvar "bot_minplayers" |
| 440 |
style 0 |
| 441 |
type ITEM_TYPE_NUMERICFIELD |
| 442 |
maxchars 2 |
| 443 |
textstyle 6 |
| 444 |
textscale .22 |
| 445 |
textstyle 6 |
| 446 |
textscale .22 |
| 447 |
rect 215 388 116 24 |
| 448 |
textalign 0 |
| 449 |
textalignx 6 |
| 450 |
textaligny 20 |
| 451 |
forecolor MP_SMALLCOLOR |
| 452 |
visible 1 |
| 453 |
} |
| 454 |
|
| 455 |
itemDef { |
| 456 |
name rocketarena |
| 457 |
style 0 |
| 458 |
text "Rocket Arena: " |
| 459 |
cvar "g_rockets" |
| 460 |
style 0 |
| 461 |
type ITEM_TYPE_YESNO |
| 462 |
textstyle 6 |
| 463 |
textscale .22 |
| 464 |
rect 215 412 117 24 |
| 465 |
textalign 0 |
| 466 |
textalignx 6 |
| 467 |
textaligny 20 |
| 468 |
forecolor MP_SMALLCOLOR |
| 469 |
visible 1 |
| 470 |
} |
| 471 |
|
| 472 |
// GAME TYPE SELECITON !! |
| 473 |
|
| 474 |
itemDef { |
| 475 |
name gametypefield |
| 476 |
style 0 |
| 477 |
ownerdraw UI_NETGAMETYPE |
| 478 |
text "Type:" |
| 479 |
style 0 |
| 480 |
textstyle 6 |
| 481 |
textscale .237 |
| 482 |
rect 382 156 223 24 |
| 483 |
textalign 0 |
| 484 |
textalignx 6 |
| 485 |
textaligny 10 |
| 486 |
forecolor MP_BOX_HEADERCOLOR |
| 487 |
visible 1 |
| 488 |
} |
| 489 |
|
| 490 |
} |