reaction/uifiles/joinserver.menu

384 lines
8.2 KiB
Plaintext
Raw Normal View History

2002-07-24 15:30:51 +00:00
#include "ui/menudef.h"
2009-03-18 19:49:03 +00:00
#define ICON_ALPHA 0.5
#define LINE_ALPHA 0.2
#define FADEIN_TIME 125
#define HINT_COLOR .25 .25 .25
#define HINT_FADE_TIME 125
#define TEXT_COLOR 0 0 0
#define ANGLES 7 -83
#define BEGIN_HINT(HINT_NAME)\
itemdef { \
name HINT_NAME \
autowrapped \
group "hints" \
subgroup "fade_alpha" \
forecolor HINT_COLOR 1 \
textalign ITEM_ALIGN_LEFT \
textalignx 6 \
textaligny 10 \
textscale .2 \
alignrect "line" ITEM_ALIGN_LEFT 0 8 460 40 \
style WINDOW_STYLE_EMPTY \
visible 0 \
decoration
#define ASSIGN_HINT(HINT_NAME)\
onFocus { show HINT_NAME ; timeFade HINT_NAME forecolor 5 5 5 1 0 HINT_FADE_TIME } \
leaveFocus { timeFade HINT_NAME forecolor 5 5 5 0 0 HINT_FADE_TIME }
#define BUTTON_DIMX 122
2009-03-18 19:49:03 +00:00
#define BUTTON_DIMY 16
#define BUTTON_SPACEX 8
#define BUTTON_SPACEY 4
#define BEGIN_CONTROL(row, idx, caption)\
itemdef { \
style WINDOW_STYLE_EMPTY \
alignrect "serverlist_window" ITEM_ALIGN_LEFT $evalint((idx-1)*(BUTTON_DIMX+BUTTON_SPACEX)) $evalint((row-1)*(BUTTON_DIMY+BUTTON_SPACEY)+220) BUTTON_DIMX BUTTON_DIMY \
text caption \
textscale .225 \
textalign ITEM_ALIGN_LEFT \
textaligny 14 \
forecolor TEXT_COLOR 1 \
visible 1
#define BEGIN_BUTTON(row, idx, caption)\
BEGIN_CONTROL(row, idx, caption) \
type ITEM_TYPE_BUTTON \
textalignx 8
#define ADD_HEADER(idx, pos, size, caption) \
itemdef { \
name "col"#idx"_title" \
type ITEM_TYPE_BUTTON \
subgroup "fade_fore_alpha" \
text caption \
forecolor TEXT_COLOR 1 \
style WINDOW_STYLE_EMPTY \
textalign ITEM_ALIGN_LEFT \
textscale .2 \
textalignx 4 \
textaligny 14 \
alignRect serverlist_window ITEM_ALIGN_LEFT pos -16 size 16 \
visible 1 \
ASSIGN_HINT(Hint_Col##idx) \
action { uiScript ServerSort $evalint(idx-1) } \
}
2002-07-24 15:30:51 +00:00
{
menuDef {
2009-03-18 19:49:03 +00:00
renderpoint
name "joinserver"
visible MENU_FALSE // Visible on open
//fullScreen MENU_FALSE
focusColor RQ3_MAIN_FOCUSCOLOR // Menu focus color for text and items
rect 48 44 560 440
2009-03-18 19:49:03 +00:00
anglevectors ANGLES
style WINDOW_STYLE_EMPTY
popup
onOOBClick { close _self ; open main }
2009-03-18 19:49:03 +00:00
onOpen { play "sound/ui/whoosh3.wav" ; uiScript "UpdateFilter" ;
setitemcolor hints forecolor HINT_COLOR 1 ; hide "hints" ;
}
onESC { uiScript closeJoin }
2009-03-18 19:49:03 +00:00
onOpenSpecial {
//normal items
setItemColor "fade_fore_alpha" forecolor 5 5 5 0 ;
timeFade "fade_fore_alpha" forecolor 5 5 5 1 0 FADEIN_TIME ;
//icon - special alpha
setItemColor "icon" forecolor 5 5 5 0 ;
timeFade "icon" forecolor 5 5 5 ICON_ALPHA 0 FADEIN_TIME ;
//line - special alpha; using backcolor
setItemColor "line" backcolor 5 5 5 0 ;
timeFade "line" backcolor 5 5 5 LINE_ALPHA 0 FADEIN_TIME ;
}
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
itemDef {
name "paper"
menuAnchor
subgroup "fade_fore_alpha"
2002-07-24 15:30:51 +00:00
style WINDOW_STYLE_SHADER
background UI_ASSETS"/paper_2"
2009-03-18 19:49:03 +00:00
forecolor MENUCOLOR_MOD 1
rect -44 -60 640 696
2009-03-18 19:49:03 +00:00
anglevectors ANGLES
2002-07-24 15:30:51 +00:00
visible 1
decoration
}
2009-03-18 19:49:03 +00:00
//Title
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
itemdef {
renderpoint
name "title"
subgroup "fade_fore_alpha"
text "Join game:"
forecolor .0 .0 .1 1
style WINDOW_STYLE_EMPTY
textalign ITEM_ALIGN_LEFT
textalignx 4
textaligny 24
textscale RQ3_MAIN_TEXTSIZE
alignRect paper ITEM_ALIGN_LEFT 72 88 480 20
2002-07-24 15:30:51 +00:00
visible 1
2009-03-18 19:49:03 +00:00
autowrapped
2002-07-24 15:30:51 +00:00
decoration
}
2009-03-18 19:49:03 +00:00
// Server Refresh Date //
2002-07-24 15:30:51 +00:00
itemdef {
2009-03-18 19:49:03 +00:00
ownerdraw UI_SERVERREFRESHDATE
2002-07-24 15:30:51 +00:00
style WINDOW_STYLE_EMPTY
2009-03-18 19:49:03 +00:00
alignrect "title" ITEM_ALIGN_LEFT 0 28 480 16
textscale .2
textalign ITEM_ALIGN_LEFT
textalignx 6
textaligny 14
forecolor .25 .25 .25 1
2002-07-24 15:30:51 +00:00
decoration
visible 1
}
2009-03-18 19:49:03 +00:00
//Line
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
itemDef {
name "line"
2002-07-24 15:30:51 +00:00
style WINDOW_STYLE_FILLED
2009-03-18 19:49:03 +00:00
backcolor .25 .25 .25 LINE_ALPHA
alignrect "title" ITEM_ALIGN_LEFT 0 48 488 2
2002-07-24 15:30:51 +00:00
visible 1
decoration
2009-03-18 19:49:03 +00:00
}
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
// GO //
2002-07-24 15:30:51 +00:00
itemdef {
2009-03-18 19:49:03 +00:00
name "btn_run"
subgroup "fade_fore_alpha"
text "> ^_G^_O <"
shortcutKey "G"
forecolor .5 0 0 1
2002-07-24 15:30:51 +00:00
type ITEM_TYPE_BUTTON
2009-03-18 19:49:03 +00:00
style WINDOW_STYLE_EMPTY
textalign ITEM_ALIGN_RIGHT
textscale .25
textalignx 36
2002-07-24 15:30:51 +00:00
textaligny 14
2009-03-18 19:49:03 +00:00
alignRect line ITEM_ALIGN_RIGHT 0 -28 40 24
2002-07-24 15:30:51 +00:00
visible 1
2009-03-18 19:49:03 +00:00
autowrapped
ASSIGN_HINT(Hint_GoPlay)
action { uiScript JoinServer }
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_HINT(Hint_GoPlay)
text "Click to play on the chosen server"
}
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_HINT(Hint_ServerInfo)
text "Click to view detailed information about the selected server"
}
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_HINT(Hint_Select)
text "Select a server from the list and click ^1GO^* to join the action"
}
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_HINT(Hint_Password)
text "Click to enter a password to join a private server"
}
2002-07-24 15:30:51 +00:00
BEGIN_HINT(Hint_Specify)
text "Click to specify a server to connect to"
}
BEGIN_HINT(Hint_Find)
text "Click to find a specific player"
}
BEGIN_HINT(Hint_AddFavorite)
text "Click to add the selected server to the Favorites list"
}
BEGIN_HINT(Hint_DelFavorite)
text "Click to delete the selected favorite"
}
BEGIN_HINT(Hint_NewFavorite)
text "Click to specify a new favorite"
}
BEGIN_HINT(Hint_Source)
text "Select the source from which to search for servers"
}
BEGIN_HINT(Hint_NewList)
text "Click to reload the list from the selected source, whether it is Local, Internet or Favorites"
}
BEGIN_HINT(Hint_RefreshList)
text "Click to refresh the current server list"
}
BEGIN_HINT(Hint_ServerEmpty)
text "Enable to show empty servers on the list"
}
BEGIN_HINT(Hint_ServerFull)
text "Enable to show full servers on the list"
}
2009-03-18 19:49:03 +00:00
// column headers //
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_HINT(Hint_Col1)
text "Click to sort servers by name"
}
BEGIN_HINT(Hint_Col2)
text "Click to sort servers by map name"
}
BEGIN_HINT(Hint_Col3)
text "Click to sort servers by number of players"
}
BEGIN_HINT(Hint_Col4)
text "Click to sort servers by game type"
}
BEGIN_HINT(Hint_Col5)
text "Click to sort servers by ping time"
}
2002-07-24 15:30:51 +00:00
itemdef {
2009-03-18 19:49:03 +00:00
name serverlist_window
group serverlist
alignrect title ITEM_ALIGN_LEFT 0 96 488 212
//rect 20 96 600 212
LISTBOX_STYLE(.2, 4)
feeder FEEDER_SERVERS
2002-07-24 15:30:51 +00:00
visible 1
2009-03-18 19:49:03 +00:00
columndef 5
4 240
4 72
4 40
4 56
4 48
//mouseenter { setitemcolor serverlist bordercolor .7 0 0 1 }
//mouseexit { setitemcolor serverlist bordercolor .5 .5 .5 1 }
//onFocus { show serverlist_hint ; timeFade serverlist_hint forecolor .9 .9 .9 1 0 250 }
//leaveFocus { timeFade serverlist_hint forecolor .9 .9 .9 0 0 250 }
ASSIGN_HINT(Hint_Select)
doubleClick { close _self; uiScript JoinServer }
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
ADD_HEADER(1, 008, 72, "server name")
ADD_HEADER(2, 250, 64, "map name")
ADD_HEADER(3, 328, 40, "plyrs")
ADD_HEADER(4, 372, 40, "type")
ADD_HEADER(5, 432, 40, "ping")
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
// ROW 1 //
2002-07-24 15:30:51 +00:00
BEGIN_BUTTON(1, 1, "^_S^_erver info...")
2002-07-24 15:30:51 +00:00
action { open "serverinfo_popmenu" }
shortcutKey "S"
2009-03-18 19:49:03 +00:00
ASSIGN_HINT(Hint_ServerInfo)
2002-07-24 15:30:51 +00:00
}
BEGIN_BUTTON(1, 2, "^_P^_assword...")
2002-07-24 15:30:51 +00:00
action { open "password_popmenu" }
2009-03-18 19:49:03 +00:00
shortcutKey "P"
ASSIGN_HINT(Hint_Password)
2002-07-24 15:30:51 +00:00
}
BEGIN_BUTTON(1, 3, "^_C^_onnect to...")
2002-07-24 15:30:51 +00:00
action { open "specify_popmenu" }
shortcutKey "C"
ASSIGN_HINT(Hint_Specify)
2002-07-24 15:30:51 +00:00
}
BEGIN_BUTTON(1, 4, "^_F^_ind a player...")
action { open "findplayer_popmenu" }
2009-03-18 19:49:03 +00:00
shortcutKey "F"
ASSIGN_HINT(Hint_Find)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
// ROW 2 //
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_BUTTON(2, 1, "^_A^_dd Favorite")
action { play "sound/ui/whoosh3.wav" ; uiScript AddFavorite ; uiScript UpdateFilter }
2009-03-18 19:49:03 +00:00
shortcutKey "A"
ASSIGN_HINT(Hint_AddFavorite)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_BUTTON(2, 2, "^_D^_el. Favorite")
action { play "sound/ui/whoosh3.wav" ; uiScript DeleteFavorite ; uiScript UpdateFilter }
2009-03-18 19:49:03 +00:00
shortcutKey "D"
ASSIGN_HINT(Hint_DelFavorite)
2002-07-24 15:30:51 +00:00
}
BEGIN_BUTTON(2, 3, "^_N^_ew Favorite...")
2002-07-24 15:30:51 +00:00
action { open "createfavorite_popmenu" }
2009-03-18 19:49:03 +00:00
shortcutKey "N"
ASSIGN_HINT(Hint_NewFavorite)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_CONTROL(2, 4, "")
2002-07-24 15:30:51 +00:00
ownerdraw UI_NETSOURCE
textalignx 8
action { play "sound/ui/whoosh3.wav" }
ASSIGN_HINT(Hint_Source)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
// ROW 3 //
2002-07-24 15:30:51 +00:00
2009-03-18 19:49:03 +00:00
BEGIN_BUTTON(3, 1, "^_G^_et New List")
action { play "sound/ui/whoosh3.wav" ; uiScript RefreshServers }
2009-03-18 19:49:03 +00:00
shortcutKey "G"
ASSIGN_HINT(Hint_NewList)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_BUTTON(3, 2, "^_R^_efresh List")
action { play "sound/ui/whoosh3.wav" ; uiScript RefreshFilter }
2009-03-18 19:49:03 +00:00
shortcutKey "R"
ASSIGN_HINT(Hint_RefreshList)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_CONTROL(3, 3, "View ^_E^_mpty:")
2002-07-24 15:30:51 +00:00
type ITEM_TYPE_YESNO
cvar "ui_browserShowEmpty"
textalignx 8
action { play "sound/ui/whoosh3.wav" ; uiScript RefreshFilter }
2009-03-18 19:49:03 +00:00
shortcutKey "V"
ASSIGN_HINT(Hint_ServerEmpty)
2002-07-24 15:30:51 +00:00
}
2009-03-18 19:49:03 +00:00
BEGIN_CONTROL(3, 4, "^_V^_iew Full:")
2002-07-24 15:30:51 +00:00
type ITEM_TYPE_YESNO
cvar "ui_browserShowFull"
textalignx 8
action { play "sound/ui/whoosh3.wav" ; uiScript RefreshFilter }
2009-03-18 19:49:03 +00:00
shortcutKey "V"
ASSIGN_HINT(Hint_ServerFull)
2002-07-24 15:30:51 +00:00
}
2002-07-24 15:30:51 +00:00
}