summaryrefslogtreecommitdiff
path: root/ui/createserver.menu
diff options
context:
space:
mode:
Diffstat (limited to 'ui/createserver.menu')
-rw-r--r--ui/createserver.menu353
1 files changed, 167 insertions, 186 deletions
diff --git a/ui/createserver.menu b/ui/createserver.menu
index f13bafc0..4c13f13e 100644
--- a/ui/createserver.menu
+++ b/ui/createserver.menu
@@ -3,16 +3,45 @@
{
\\ Server Creation \\
+#define W 640
+#define H 480
+#define BORDER 10
+
+#define PREVIEW_W 300
+#define PREVIEW_H 225
+#define PREVIEW_X BORDER
+#define PREVIEW_Y BORDER
+
+#define BC_W (W-(2*BORDER))
+#define BC_H 50
+#define BC_X BORDER
+#define BC_Y (H-(BC_H+BORDER))
+#define ARROW_W 50
+#define ARROW_H BC_H
+
+#define MAPS_W PREVIEW_W
+#define MAPS_H (H-((4*BORDER)+PREVIEW_H+BC_H))
+#define MAPS_X BORDER
+#define MAPS_Y ((2*BORDER)+PREVIEW_H)
+
+#define OPTIONS_W (W-((3*BORDER)+PREVIEW_W))
+#define OPTIONS_H (H-((3*BORDER)+BC_H))
+#define OPTIONS_X ((2*BORDER)+PREVIEW_W)
+#define OPTIONS_Y BORDER
+#define ELEM_OFF_Y 20
+#define ELEM_OFF_X -135
+#define ELEM_H 21
+
menuDef
{
name "createserver"
- visible 0
- fullscreen 1
- rect 0 0 640 480
+ visible MENU_FALSE
+ fullscreen MENU_TRUE
+ rect 0 0 W H
focusColor 1 .75 0 1
- outOfBoundsClick
- style 0
-
+ outOfBoundsClick
+ style WINDOW_STYLE_EMPTY
+
onOpen
{
uiScript loadArenas;
@@ -21,45 +50,19 @@
hide back_alt;
show back
}
-
+
onEsc
{
close createserver
}
-
+
itemDef
{
name background
- rect 0 0 640 480
+ rect 0 0 W H
style WINDOW_STYLE_FILLED
backcolor 0 0 0 1
- visible 1
- decoration
- }
-
- itemDef
- {
- name window
- rect 2 2 330 418
- style WINDOW_STYLE_FILLED
- border 1
- bordercolor 1 1 1 .25
- forecolor 1 1 1 1
- backcolor 0 0 0 .25
- visible 1
- decoration
- }
-
- itemDef
- {
- name window
- rect 334 2 302 418
- style WINDOW_STYLE_FILLED
- border 1
- bordercolor 1 1 1 .25
- forecolor 1 1 1 1
- backcolor 0 0 0 .25
- visible 1
+ visible MENU_TRUE
decoration
}
@@ -68,28 +71,18 @@
itemDef
{
name mappreview
- style 0
+ style WINDOW_STYLE_EMPTY
ownerdraw UI_STARTMAPCINEMATIC
- rect 7 7 320 240
- border 1
- bordercolor .5 .5 .5 .5
- visible 1
- }
-
- itemDef
- {
- name mappreview
- style WINDOW_STYLE_FILLED
- rect 6 6 322 242
- border 1
- bordercolor .5 .5 .5 .5
- visible 1
+ rect PREVIEW_X PREVIEW_Y PREVIEW_W PREVIEW_H
+ border WINDOW_BORDER_FULL
+ bordercolor .5 .5 .5 1
+ visible MENU_TRUE
}
itemDef
{
name maplist
- rect 6 252 322 164
+ rect MAPS_X MAPS_Y MAPS_W MAPS_H
type ITEM_TYPE_LISTBOX
style WINDOW_STYLE_EMPTY
elementwidth 120
@@ -97,14 +90,12 @@
textscale .33
elementtype LISTBOX_TEXT
feeder FEEDER_ALLMAPS
- textalign 3
- textaligny 14
- border 1
+ border WINDOW_BORDER_FULL
bordercolor 0.5 0.5 0.5 1
forecolor 1 1 1 1
backcolor 0.2 0.2 0.2 1
outlinecolor 0.1 0.1 0.1 0.5
- visible 1
+ visible MENU_TRUE
columns 1
2 190 ITEM_ALIGN_LEFT
}
@@ -112,74 +103,81 @@
// SETTINGS //
- // NORMAL //
+ itemDef
+ {
+ name window
+ rect OPTIONS_X OPTIONS_Y OPTIONS_W OPTIONS_H
+ style WINDOW_STYLE_FILLED
+ backcolor 0 0 0 1
+ visible MENU_TRUE
+ decoration
+
+ border WINDOW_BORDER_FULL
+ borderSize 1.0
+ borderColor 0.5 0.5 0.5 1
+ }
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_EDITFIELD
text "Host Name:"
cvar "sv_hostname"
- maxChars 32
- maxPaintChars 20
- rect 420 30 128 20
+ maxChars 40
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(0*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
-
+
itemDef
{
name normal
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Time Limit:"
cvar "timelimit"
- rect 420 50 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(1*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
maxchars 4
- textaligny 12
- textscale .36
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Maximum Players:"
cvar "sv_maxclients"
- rect 420 70 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(2*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
maxchars 4
- textaligny 12
- textscale .36
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_YESNO
text "Require Password:"
cvar "g_needpassword"
- rect 420 90 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(3*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -189,19 +187,17 @@
itemDef
{
name expert
- group grpsettings
- type 4
+ type ITEM_TYPE_EDITFIELD
text "Password:"
cvar "g_password"
- rect 420 110 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(4*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
maxchars 10
- maxPaintChars 10
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
@@ -209,17 +205,16 @@
itemDef
{
name normal
- group grpsettings
type ITEM_TYPE_YESNO
text "Pure Server:"
cvar "sv_pure"
- rect 420 160 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(6*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -229,20 +224,19 @@
itemDef
{
name normal
- group grpsettings
type ITEM_TYPE_MULTI
text "Dedicated:"
// dedicated is a special cvar in that as soon as it is set,
// the game goes to console only so the ui catches this one specifically
cvar "ui_dedicated"
cvarFloatList { "No" 0 "LAN" 1 "Internet" 2 }
- rect 420 180 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(7*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -252,17 +246,16 @@
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_YESNO
text "Auto Download:"
cvar "sv_allowdownload"
- rect 420 200 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(8*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -272,17 +265,16 @@
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_YESNO
text "Enable Voting:"
cvar "g_allowvote"
- rect 420 220 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(9*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -294,51 +286,48 @@
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Minimum Ping:"
cvar "sv_minping"
- rect 420 270 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(11*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
maxchars 4
- textaligny 12
- textscale .36
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Maximum Ping:"
cvar "sv_maxping"
- rect 420 290 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(12*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
maxchars 4
- textscale .36
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_YESNO
text "Synchronous Client:"
cvar "g_synchronousclients"
- rect 420 310 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(13*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
action
{
play "sound/misc/menu1.wav"
@@ -348,56 +337,50 @@
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Max Rate:"
cvar "sv_maxrate"
- rect 420 330 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(14*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
maxchars 4
- textaligny 12
- textscale .36
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Zombie Time:"
cvar "sv_zombietime"
- rect 420 350 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(15*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
maxchars 4
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
itemDef
{
name expert
- group grpsettings
type ITEM_TYPE_NUMERICFIELD
text "Reconnect Limit:"
cvar "sv_reconnectlimit"
maxchars 4
- rect 420 370 128 20
+ rect (OPTIONS_X+BORDER) (OPTIONS_Y+ELEM_OFF_Y+(16*ELEM_H)) (OPTIONS_W-(2*BORDER)) ELEM_H
textalign ITEM_ALIGN_RIGHT
- textalignx 65
- textaligny 12
- textscale .36
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ELEM_OFF_X
+ textscale .36
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
}
-
-
-
@@ -406,16 +389,16 @@
itemDef
{
name back
- style 3
+ style WINDOW_STYLE_SHADER
background "ui/assets/backarrow.tga"
- rect 16 424 50 50
- visible 1
+ rect BC_X BC_Y ARROW_H ARROW_W
+ visible MENU_TRUE
action
{
- play "sound/misc/menu4.wav";
+ play "sound/misc/menu4.wav";
close createserver
}
-
+
mouseEnter
{
hide back;
@@ -428,29 +411,29 @@
name back_alt
style WINDOW_STYLE_SHADER
background "ui/assets/backarrow_alt.tga"
- rect 16 424 50 50
+ rect BC_X BC_Y ARROW_H ARROW_W
backcolor 0 0 0 0
forecolor 1 1 1 1
- visible 0
+ visible MENU_FALSE
type ITEM_TYPE_BUTTON
-
+
text "Back"
textalign ITEM_ALIGN_LEFT
- textaligny 36
- textalignx 60
+ textvalign ITEM_VALIGN_CENTER
+ textalignx ARROW_W
textscale .6
-
+
mouseExit
{
hide back_alt;
show back
}
-
+
action
{
- play "sound/misc/menu4.wav";
+ play "sound/misc/menu4.wav";
close createserver
- }
+ }
}
@@ -459,22 +442,21 @@
itemDef
{
name accept
- style 3
- rect 574 424 50 50
+ style WINDOW_STYLE_SHADER
+ rect ((BC_X+BC_W)-ARROW_W) BC_Y ARROW_H ARROW_W
background "ui/assets/forwardarrow.tga"
backcolor 0 0 0 0
forecolor 1 1 1 1
- visible 1
+ visible MENU_TRUE
mouseEnter
{
hide accept;
show accept_alt
}
-
+
action
{
- play "sound/misc/menu1.wav";
- close fight; //TA: no i don't know
+ play "sound/misc/menu1.wav";
uiScript StartServer
}
}
@@ -483,30 +465,29 @@
{
name accept_alt
style WINDOW_STYLE_SHADER
- rect 574 424 50 50
+ rect ((BC_X+BC_W)-ARROW_W) BC_Y ARROW_H ARROW_W
background "ui/assets/forwardarrow_alt.tga"
backcolor 0 0 0 0
type ITEM_TYPE_BUTTON
forecolor 1 1 1 1
- visible 0
- type ITEM_TYPE_BUTTON
-
+ visible MENU_FALSE
+ type ITEM_TYPE_BUTTON
+
text "Create"
- textalign ITEM_ALIGN_LEFT
- textaligny 36
- textalignx -70
+ textalign ITEM_ALIGN_RIGHT
+ textvalign ITEM_VALIGN_CENTER
+ textalignx -ARROW_W
textscale .6
-
+
mouseExit
{
hide accept_alt;
show accept
}
-
+
action
{
- play "sound/misc/menu1.wav";
- close fight; //TA: no i don't know
+ play "sound/misc/menu1.wav";
uiScript StartServer
}
}