cod5-sdk/raw/ui/lan.menu
2008-11-20 00:00:00 +00:00

877 lines
20 KiB
Text

#include "ui/menudef.h"
#define ORIGIN_MENU_TREE 54 64
#define ORIGIN_MENU_TITLE 151 64
#define TREE_COLOR 1 1 1 0.5
#define ORIGIN_BUTTON_BACK 52 438
#define ORIGIN_BUTTON_CONTINUE 508 438
#define ORIGIN_POPUPTITLE 320 160
#define HIGHLIGHT_COLOR 0.3 0.35 0.55 0.25
#define OPTIONS_HEADING_JOIN_COLOR .35 .4 .2 .4
{
menuDef
{
name menu_lan
fullscreen 1
rect 0 0 640 480
focusColor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
soundloop "music_mainmenu"
onOpen
{
//execnow "nosplitscreen";
uiScript UpdateFilter;
setfocus serverlist;
}
onEsc
{
close menu_lan;
//exec "splitscreencontrols";
}
// gray background
/*itemDef
{
style WINDOW_STYLE_FILLED
rect FULLSCREEN_WIDE
backcolor 0.2 0.2 0.2 1
visible 1
decoration
}*/
// background
#include "ui/bg.inc"
//itemDef
//{
// style WINDOW_STYLE_SHADER
// rect FULLSCREEN_WIDE
// background "background_cod5_blur"
// visible 1
// decoration
//}
//// gradient_top
//itemDef
//{
// style WINDOW_STYLE_SHADER
// rect 0 55 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0
// background "gradient_top"
// visible 1
// decoration
//}
//// gradient_bottom
//itemDef
//{
// style WINDOW_STYLE_SHADER
// rect 0 351 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0
// background "gradient_bottom"
// visible 1
// decoration
//}
//itemDef
//{
// style WINDOW_STYLE_FILLED
// rect -128 66 896 20
// backcolor 0.1412 0.1412 0.1412 1
// visible 1
// decoration
//}
//itemDef
//{
// style WINDOW_STYLE_SHADER
// rect -128 86 896 1
// background "line_horizontal"
// forecolor 1 1 1 0.75
// visible 1
// decoration
//}
#include "ui/bars.menu"
// -------------------- TREE TITLE -------------------
itemDef
{
type ITEM_TYPE_TEXT
origin ORIGIN_MENU_TREE
forecolor TREE_COLOR
text "COOP :: LAN ::"
textfont UI_FONT_NORMAL
textscale TEXTSIZE_DEFAULT
visible 1
decoration
}
itemDef
{
type ITEM_TYPE_TEXT
origin ORIGIN_MENU_TITLE
forecolor COLOR_TITLE
text "GAME BROWSER"
textfont UI_FONT_NORMAL
textscale TEXTSIZE_DEFAULT
visible 1
decoration
}
// --------------------------- buttons ----------------------------
itemDef
{
name refreshSource
text "@MENU_REFRESH_LIST"
type ITEM_TYPE_BUTTON
textscale 0.25
textstyle ITEM_TEXTSTYLE_SHADOWED
style WINDOW_STYLE_FILLED
rect 450 5 130 15
textalign ITEM_ALIGN_RIGHT
textalignx -5
textaligny 11
//textfont UI_FONT_NORMAL
forecolor .9 .9 .95 1
visible 1
mouseEnter { show message_refreshSOurce; play "mouse_over"; }
mouseExit { hide message_refreshSource; }
action { play "mouse_click" ; uiScript RefreshServers }
}
itemDef
{
name refreshFilter
text "@MENU_QUICK_REFRESH"
textscale 0.25
textstyle ITEM_TEXTSTYLE_SHADOWED
style WINDOW_STYLE_FILLED
//textfont UI_FONT_NORMAL
type ITEM_TYPE_BUTTON
rect 450 20 130 15
textalign ITEM_ALIGN_RIGHT
textalignx -5
textaligny 11
forecolor .9 .9 .95 1
visible 1
mouseEnter { show message_refreshFilter; play "mouse_over"; }
mouseExit { hide message_refreshFilter; }
action { play "mouse_click"; uiScript RefreshFilter }
}
itemDef
{
name back
text "@MENU_BACK"
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
textstyle ITEM_TEXTSTYLE_SHADOWED
rect 30 429 90 14
textalign ITEM_ALIGN_CENTER
textscale 0.4
textaligny 11
visible 1
//border 1
//bordercolor 1 1 1 1
forecolor .9 .9 .95 1
mouseEnter { play "mouse_over" }
action
{
play "mouse_click";
close createserver ;
close joinserver ;
close multi_menu ;
open main
}
mouseEnter { play "mouse_over"; }
}
itemDef
{
name accept
text "@MENU_JOIN_SERVER"
type 1
textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
textstyle ITEM_TEXTSTYLE_SHADOWED
rect 500 429 90 14
textalign ITEM_ALIGN_CENTER
textscale 0.4
textaligny 11
forecolor .9 .9 .95 1
visible 1
mouseEnter { play "mouse_over"}
action
{
play "mouse_click";
exec "AcceptInputFromActiveControl"
uiScript JoinServer;
}
}
itemDef
{
style WINDOW_STYLE_SHADER
rect 578 421 20 20
background "ui_arrow_right"
forecolor 1 1 1 1
visible 1
decoration
}
itemDef
{
style WINDOW_STYLE_SHADER
rect 34 421 20 20
background "ui_arrow_left"
forecolor 1 1 1 1
visible 1
decoration
}
//SERVER LIST HEADER SORT TABS -----------------------------------
//itemDef
//{
// type ITEM_TYPE_TEXT
// origin 51 84
// text "@MENU_HOST_NAME"
// textscale TEXTSIZE_DEFAULT
// forecolor 1 1 1 0.65
// textfont UI_FONT_NORMAL
// visible 1
// decoration
//}
//
//itemDef
//{
// type ITEM_TYPE_TEXT
// origin 260 84
// text "@MENU_MAP_NAME"
// textscale TEXTSIZE_DEFAULT
// forecolor 1 1 1 0.65
// textfont UI_FONT_NORMAL
// visible 1
// decoration
//}
//
//itemDef
//{
// type ITEM_TYPE_TEXT
// origin 432 84
// text "@MENU_NUMPLAYERS"
// textscale TEXTSIZE_DEFAULT
// forecolor 1 1 1 0.65
// textfont UI_FONT_NORMAL
// visible 1
// decoration
//}
//
//itemDef
//{
// type ITEM_TYPE_TEXT
// origin 513 84
// text "@MENU_TYPE1"
// textfont UI_FONT_NORMAL
// textscale TEXTSIZE_DEFAULT
// forecolor 1 1 1 0.65
// visible 1
// decoration
//}
// column dividers --------------------------------
//itemDef
//{
// style WINDOW_STYLE_FILLED
// rect 256 87 1 327
// backcolor 1 1 1 .35
// visible 1
// decoration
//}
//
//itemDef
//{
// style WINDOW_STYLE_FILLED
// rect 428 87 1 327
// backcolor 1 1 1 .35
// visible 1
// decoration
//}
//
//itemDef
//{
// style WINDOW_STYLE_FILLED
// rect 510 87 1 327
// backcolor 1 1 1 .35
// visible 1
// decoration
//}
itemDef
{
name passwordColumn
group grpColumn
rect 10 80 21 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
//bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name hardwareColumn
group grpColumn
rect 30 80 21 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
//bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name serverColumn
group grpColumn
rect 50 80 240 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
//bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name mapColumn
group grpColumn
rect 289 80 120 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name playerColumn
group grpColumn
rect 407 80 56 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name typeColumn
group grpColumn
rect 462 80 54 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name voiceColumn
group grpColumn
rect 515 80 20 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name pureColumn
group grpColumn
rect 535 80 20 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name modColumn
group grpColumn
rect 555 80 20 335
style WINDOW_STYLE_FILLED
border 1
backcolor 0 0 0 0
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
itemDef
{
name pingColumn
group grpColumn
rect 575 80 37 335
style WINDOW_STYLE_FILLED
border 1
// backcolor 0 0 0 0
backcolor 0 0 0.1 .5 // Start highlighted
bordersize 1
bordercolor .5 .5 .5 .5
visible 1
decoration
}
// SERVER LIST TEXT --------------------------------
itemDef
{
// name serverlist
// rect 45 83 564 330
// type ITEM_TYPE_LISTBOX
// style WINDOW_STYLE_FILLED
// elementwidth 120
// elementheight 18
// textfont UI_FONT_NORMAL
// textalignx 1
// textscale TEXTSIZE_DEFAULT
// elementtype LISTBOX_TEXT
// feeder FEEDER_SERVERS
// forecolor 1 1 1 0.65
// outlinecolor HIGHLIGHT_COLOR
//// numcols xpos xwidth textlen
// columns 4 0 35 40
// 209 45 25
// 381 5 10
// 462 20 10
name serverlist
// rect 0 100 600 165
rect 9 80 620 332
type ITEM_TYPE_LISTBOX
style WINDOW_STYLE_FILLED
elementwidth 120
elementheight 15
textfont UI_FONT_NORMAL
// border 1
// bordercolor .5 .5 .5 .5
textalign ITEM_ALIGN_CENTER
// textalignx -310
textalignx 1 //-309
// textaligny -3
textaligny -1
textscale 0.25
elementtype LISTBOX_TEXT
feeder FEEDER_SERVERS
forecolor 1 1 1 1
focusColor 1 1 1 1
disableColor 1 1 1 1
// backcolor .5 .5 .5 .2
backcolor 0 0 0 0
outlinecolor .19 .3 .2 .45
visible 1
// numcols xpos xwidth textlen
columns 10 2 20 20
20 18 10
41 238 22
284 119 25
398 64 10
462 43 10
505 14 14
529 19 10
548 18 20
566 20 20
visible 1
doubleClick
{
play "mouse_click";
exec "AcceptInputFromActiveControl"
uiScript JoinServer
}
}
// SERVER LIST HEADER SORT TABS //
itemDef
{
name password
group grpTabs
// text "@MENU_SERVER NAME"
type ITEM_TYPE_BUTTON
// textscale 0.25
// textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .25
// rect 20 130 265 15
rect 10 65 19 15
// textalign ITEM_ALIGN_LEFT
// textalignx 2 // center
// textaligny 10
forecolor 1 1 1 1
backcolor OPTIONS_HEADING_JOIN_COLOR
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 0 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor password backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor passwordColumn backcolor 0 0 0.4 .15
}
mouseEnter { show message_sort ; setitemcolor passwordColumn bordercolor 1 1 1 1 ; play "mouse_over" }
mouseExit { hide message_sort ; setitemcolor passwordColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name passwordicon
style WINDOW_STYLE_SHADER
rect 13 65 16 16
background "hud_server_locked"
visible 1
decoration
}
itemDef
{
name hardware
group grpTabs
// text "@MENU_SERVER NAME"
type ITEM_TYPE_BUTTON
// textscale 0.25
// textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .25
// rect 20 130 265 15
rect 30 65 19 15
// textalign ITEM_ALIGN_LEFT
// textalignx 2 // center
// textaligny 10
forecolor 1 1 1 1
backcolor OPTIONS_HEADING_JOIN_COLOR
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 1 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor hardware backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor hardwareColumn backcolor 0 0 0.4 .15
}
mouseEnter { show message_sort ; setitemcolor hardwareColumn bordercolor 1 1 1 1 ; play "mouse_over" }
mouseExit { hide message_sort ; setitemcolor hardwareColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name hardwareicon
style WINDOW_STYLE_SHADER
rect 33 65 16 16
background "server_hardware_header"
visible 1
decoration
}
itemDef
{
name server
group grpTabs
text "@MENU_SERVER NAME"
type ITEM_TYPE_BUTTON
textscale 0.25
textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .25
// rect 20 130 265 15
rect 50 65 238 15
textalign ITEM_ALIGN_LEFT
textalignx 2 // center
textaligny 10
forecolor 1 1 1 1
backcolor OPTIONS_HEADING_JOIN_COLOR
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 2 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor server backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor serverColumn backcolor 0 0 0.4 .15
}
mouseEnter { show message_sort ; setitemcolor serverColumn bordercolor 1 1 1 1 ; play "mouse_over" }
mouseExit { hide message_sort ; setitemcolor serverColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name map
group grpTabs
type ITEM_TYPE_BUTTON
text "@MENU_MAP_NAME"
textscale 0.25
textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
// rect 284 130 115 15
rect 289 65 118 15
textalign ITEM_ALIGN_LEFT
textalignx 2 // center
textaligny 10
border 1
bordercolor .1 .1 .1 .25
backcolor OPTIONS_HEADING_JOIN_COLOR
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 3 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor map backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor mapColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor mapColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor mapColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name Players
group grpTabs
text "@MENU_NUMPLAYERS"
type ITEM_TYPE_BUTTON
textscale 0.25
style WINDOW_STYLE_FILLED
textfont UI_FONT_NORMAL
// rect 398 130 75 15
rect 408 65 53 15 // 10
textalign ITEM_ALIGN_LEFT
textalignx 2 // center
textaligny 10
border 1
bordercolor .1 .1 .1 .25
forecolor 1 1 1 1
backcolor OPTIONS_HEADING_JOIN_COLOR
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 4 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor Players backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor playerColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor playerColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor playerColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name Type
group grpTabs
text "@MENU_TYPE1"
textfont UI_FONT_NORMAL
textscale 0.25
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
// rect 472 130 94 15
rect 462 65 52 15 // 10
textalign ITEM_ALIGN_LEFT
textalignx 2 // center
textaligny 10
border 1
bordercolor .1 .1 .1 .25
backcolor OPTIONS_HEADING_JOIN_COLOR
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 5 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor Type backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor typeColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor typeColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor typeColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name voice
group grpTabs
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
rect 515 65 18 15
border 1
bordercolor .1 .1 .1 .25
backcolor OPTIONS_HEADING_JOIN_COLOR
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 6;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor voice backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor voiceColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor voiceColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor voiceColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name voiceicon
style WINDOW_STYLE_SHADER
rect 515 65 18 16
background "voice_on"
visible 1
decoration
}
itemDef
{
name pure
group grpTabs
// text "@MENU_TYPE1"
// textfont UI_FONT_NORMAL
// textscale 0.25
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
rect 535 65 18 15 // 10
// textalign ITEM_ALIGN_LEFT
// textalignx 2 // center
// textaligny 10
border 1
bordercolor .1 .1 .1 .25
backcolor OPTIONS_HEADING_JOIN_COLOR
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 7 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor pure backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor pureColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor pureColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor pureColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name pureicon
style WINDOW_STYLE_SHADER
rect 535 65 18 16
background "hud_server_pure"
visible 1
decoration
}
itemDef
{
name Mod
group grpTabs
// text "@MENU_TYPE1"
// textfont UI_FONT_NORMAL
// textscale 0.25
type ITEM_TYPE_BUTTON
style WINDOW_STYLE_FILLED
rect 555 65 18 15 // 10
// textalign ITEM_ALIGN_LEFT
// textalignx 2 // center
// textaligny 10
border 1
bordercolor .1 .1 .1 .25
backcolor OPTIONS_HEADING_JOIN_COLOR
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 8 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor Mod backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor modColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor modColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor modColumn bordercolor .5 .5 .5 .5 }
}
itemDef
{
name modicon
style WINDOW_STYLE_SHADER
rect 558 65 18 16
background "mod_header"
visible 1
decoration
}
itemDef
{
name Ping
group grpTabs
text "@MENU_PING"
type ITEM_TYPE_BUTTON
textscale 0.25
textfont UI_FONT_NORMAL
style WINDOW_STYLE_FILLED
border 1
bordercolor .1 .1 .1 .25
rect 576 65 36 15
textalign ITEM_ALIGN_LEFT
textalignx 2 // center
textaligny 10
// backcolor OPTIONS_HEADING_JOIN_COLOR
backcolor .1 .2 .37 1 // Start highlighted
forecolor 1 1 1 1
visible 1
action
{
play "mouse_click" ;
uiScript ServerSort 9 ;
setitemcolor grpTabs backcolor .3 .5 .2 .3 ;
setitemcolor Ping backcolor .1 .2 .37 1 ;
setitemcolor grpColumn backcolor 0 0 0 0 ;
setitemcolor pingColumn backcolor 0 0 .4 .15
}
mouseEnter { show message_sort ; setitemcolor pingColumn bordercolor 1 1 1 1 ; play "mouse_over"}
mouseExit { hide message_sort ; setitemcolor pingColumn bordercolor .5 .5 .5 .5 }
}
#include "ui/safearea.menu"
}
}