Reimplement server browser

This commit is contained in:
Paul Chote
2011-05-18 20:25:47 +12:00
parent 6e3a88f670
commit 845b32281d
10 changed files with 580 additions and 505 deletions

View File

@@ -141,6 +141,7 @@ dialog: uibuttons.png
corner-bl: 0,62,2,2
corner-br: 62,62,2,2
# Pressed button
dialog3: uibuttons.png
background: 2,2,60,60
border-r: 62,2,2,60
@@ -152,6 +153,7 @@ dialog3: uibuttons.png
corner-bl: 0,62,2,2
corner-br: 62,62,2,2
# Normal buttton
dialog2: uibuttons.png
background: 2,66,60,60
border-r: 62,66,2,60
@@ -163,6 +165,18 @@ dialog2: uibuttons.png
corner-bl: 0,126,2,2
corner-br: 62,126,2,2
# Panel background
panel: uibuttons.png
background: 66,2,60,60
border-r: 126,2,2,60
border-l: 64,2,2,60
border-b: 66,62,60,2
border-t: 66,0,60,2
corner-tl: 64,0,2,2
corner-tr: 126,0,2,2
corner-bl: 64,62,2,2
corner-br: 126,62,2,2
dialog4: dialog4.png
border-t: 5,0,52,6
border-b: 5,58,52,6

View File

@@ -19,160 +19,157 @@ Container@MENU_BACKGROUND:
Width:WINDOW_RIGHT
Height:WINDOW_BOTTOM
Background:shellmapborder
Container@MAIN_MENU:
Id:MAIN_MENU
Container@MENUS:
X:(WINDOW_RIGHT-WIDTH)/2
Y:WINDOW_BOTTOM-33-HEIGHT-10
Width:740
Height:35
Children:
Label@TITLE:
X:0
Y:0-30
Children:
Container@MAIN_MENU:
Id:MAIN_MENU
Width:PARENT_RIGHT
Height:20
Text:Main Menu
Align:Center
Bold:True
Contrast:True
Button@SOLO_BUTTON:
Id:SOLO_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Skirmish
Bold:True
Button@MULTIPLAYER_BUTTON:
Id:MULTIPLAYER_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Multiplayer
Bold:True
Button@SETTINGS_BUTTON:
Id:SETTINGS_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Settings
Bold:True
Button@REPLAY_BUTTON:
Id:REPLAY_BUTTON
X:450
Y:0
Width:140
Height:35
Text: Replays
Bold: True
Button@QUIT_BUTTON:
Id:QUIT_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Quit
Bold:True
Container@MULTIPLAYER_MENU:
Id:MULTIPLAYER_MENU
X:(WINDOW_RIGHT-WIDTH)/2
Y:WINDOW_BOTTOM-33-HEIGHT-10
Width:740
Height:35
Visible:false
Children:
Label@TITLE:
X:0
Y:0-30
Children:
Label@TITLE:
X:0
Y:0-30
Width:PARENT_RIGHT
Height:20
Text:Main Menu
Align:Center
Bold:True
Contrast:True
Button@SOLO_BUTTON:
Id:SOLO_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Skirmish
Bold:True
Button@MULTIPLAYER_BUTTON:
Id:MULTIPLAYER_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Multiplayer
Bold:True
Button@SETTINGS_BUTTON:
Id:SETTINGS_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Settings
Bold:True
Button@REPLAY_BUTTON:
Id:REPLAY_BUTTON
X:450
Y:0
Width:140
Height:35
Text: Replays
Bold: True
Button@QUIT_BUTTON:
Id:QUIT_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Quit
Bold:True
Container@MULTIPLAYER_MENU:
Id:MULTIPLAYER_MENU
Width:PARENT_RIGHT
Height:20
Text:Multiplayer
Align:Center
Bold:True
Contrast:True
Button@CREATE_BUTTON:
Id:CREATE_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Create Server
Bold:True
Button@JOIN_BUTTON:
Id:JOIN_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Find Server
Bold:True
Button@DIRECTCONNECT_BUTTON:
Id:DIRECTCONNECT_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Direct Connect
Bold:True
Button@BACK_BUTTON:
Id:BACK_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Back
Bold:True
Container@SETTINGS_MENU:
Id:SETTINGS_MENU
X:(WINDOW_RIGHT-WIDTH)/2
Y:WINDOW_BOTTOM-33-HEIGHT-10
Width:740
Height:35
Visible:False
Children:
Label@TITLE:
X:0
Y:0-30
Visible:false
Children:
Label@TITLE:
X:0
Y:0-30
Width:PARENT_RIGHT
Height:20
Text:Multiplayer
Align:Center
Bold:True
Contrast:True
Button@CREATE_BUTTON:
Id:CREATE_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Create Server
Bold:True
Button@JOIN_BUTTON:
Id:JOIN_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Find Server
Bold:True
Button@DIRECTCONNECT_BUTTON:
Id:DIRECTCONNECT_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Direct Connect
Bold:True
Button@BACK_BUTTON:
Id:BACK_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Back
Bold:True
Container@SETTINGS_MENU:
Id:SETTINGS_MENU
Width:PARENT_RIGHT
Height:20
Text:Settings
Align:Center
Bold:True
Contrast:True
Button@MODS_BUTTON:
Id:MODS_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Mods
Bold:True
Button@MUSIC_BUTTON:
Id:MUSIC_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Music
Bold:True
Button@PREFERENCES_BUTTON:
Id:PREFERENCES_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Preferences
Bold:True
Button@BACK_BUTTON:
Id:BACK_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Back
Bold:True
Visible:False
Children:
Label@TITLE:
X:0
Y:0-30
Width:PARENT_RIGHT
Height:20
Text:Settings
Align:Center
Bold:True
Contrast:True
Button@MODS_BUTTON:
Id:MODS_BUTTON
X:0
Y:0
Width:140
Height:35
Text:Mods
Bold:True
Button@MUSIC_BUTTON:
Id:MUSIC_BUTTON
X:150
Y:0
Width:140
Height:35
Text:Music
Bold:True
Button@PREFERENCES_BUTTON:
Id:PREFERENCES_BUTTON
X:300
Y:0
Width:140
Height:35
Text:Preferences
Bold:True
Button@BACK_BUTTON:
Id:BACK_BUTTON
X:600
Y:0
Width:140
Height:35
Text:Back
Bold:True
Background@QUICKMODSWITCHER:
Id:QUICKMODSWITCHER
Background: dialog4

View File

@@ -1,360 +1,207 @@
Background@CREATESERVER_BG:
Id:CREATESERVER_BG
Delegate:CreateServerMenuDelegate
Container@SERVERBROWSER_PANEL:
Id:SERVERBROWSER_PANEL
Delegate:CncServerBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:240
Y:(WINDOW_BOTTOM - 500)/2
Width:740
Height:535
Children:
Label@LABEL_TITLE:
Id:LABEL_TITLE
X:0
Y:20
Width:400
Height:25
Text:Create Server
Align:Center
Bold:True
Label@GAME_TITLE_LABEL:
Id:GAME_TITLE_LABEL
X:50
Y:59
Width:95
Height:25
Align: Right
Text:Game Title:
TextField@GAME_TITLE:
Id:GAME_TITLE
X:150
Y:60
Width:210
MaxLength:50
Height:25
Text:OpenRA Game
Label@EXTERNAL_PORT_LABEL:
Id:EXTERNAL_PORT_LABEL
X:50
Y:94
Width:95
Height:25
Align: Right
Text:External Port:
TextField@EXTERNAL_PORT:
Id:EXTERNAL_PORT
X:150
Y:95
Width:50
MaxLength:5
Height:25
Text:OpenRA Game
Label@LISTEN_PORT_LABEL:
Id:LISTEN_PORT_LABEL
X:210
Y:94
Width:95
Height:25
Align: Right
Text:Listen Port:
TextField@LISTEN_PORT:
Id:LISTEN_PORT
X:310
Y:95
Width:50
MaxLength:5
Height:25
Checkbox@CHECKBOX_ONLINE:
Id:CHECKBOX_ONLINE
X:165
Y:130
Width:300
Height:20
Text:Advertise game Online
Button@BUTTON_START:
Id:BUTTON_START
X:130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Create
Bold:True
Button@BUTTON_CANCEL:
Id:BUTTON_CANCEL
X:260
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Bold:True
Background@JOINSERVER_BG:
Id:JOINSERVER_BG
Delegate:ServerBrowserDelegate
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:700
Height:410
Children:
Label@JOINSERVER_LABEL_TITLE:
Id:JOINSERVER_LABEL_TITLE
X:0
Y:20
Width:PARENT_RIGHT
Height:25
Text:Join Server
Align:Center
Bold:True
ScrollPanel@SERVER_LIST:
Id:SERVER_LIST
X:20
Y:50
Width:390
Height:300
Background@bg:
Width:740
Height:500
Background:panel
Children:
Label@SERVER_TEMPLATE:
Id:SERVER_TEMPLATE
Width:PARENT_RIGHT-28
Height:25
X:2
Y:0
Visible:false
Label@JOINSERVER_PROGRESS_TITLE:
Id:JOINSERVER_PROGRESS_TITLE
X:150
Y:PARENT_BOTTOM / 2 - HEIGHT
Width:150
Height:30
Background:dialog4
Text:Fetching games...
Align:Center
Container@SERVER_INFO:
Id:SERVER_INFO
X:0
Y:0
Width:PARENT_RIGHT
Height:PARENT_BOTTOM
Visible:false
Children:
MapPreview@MAP_PREVIEW:
Id:MAP_PREVIEW
X:PARENT_RIGHT-241
ScrollPanel@SERVER_LIST:
Id:SERVER_LIST
X:15
Y:30
Width:192
Height:192
Label@SERVER_IP_LABEL:
Id:SERVER_IP_LABEL
X:PARENT_RIGHT - 200 - WIDTH
Y:230
Align:Right
Width:70
Height:20
Text:Server:
Bold:True
Label@SERVER_IP:
Id:SERVER_IP
X:PARENT_RIGHT - 195
Y:230
Align:Left
Width:70
Height:20
Label@MAP_PLAYERS_LABEL:
Id:MAP_PLAYERS_LABEL
X:PARENT_RIGHT - 200 - WIDTH
Y:250
Align:Right
Width:70
Height:20
Text:Players:
Bold:True
Label@MAP_PLAYERS:
Id:MAP_PLAYERS
X:PARENT_RIGHT - 195
Y:250
Align:Left
Width:70
Height:20
Label@MAP_TITLE_LABEL:
Id:MAP_TITLE_LABEL
X:PARENT_RIGHT - 200 - WIDTH
Y:270
Align:Right
Width:70
Height:20
Text:Map:
Bold:True
Label@MAP_TITLE:
Id:MAP_TITLE
X:PARENT_RIGHT - 195
Y:270
Align:Left
Width:70
Height:20
Label@SERVER_MODS_LABEL:
Id:SERVER_MODS_LABEL
X:PARENT_RIGHT - 200 - WIDTH
Y:290
Align:Right
Width:70
Height:20
Text:Mods:
Bold:True
Label@SERVER_MODS:
Id:SERVER_MODS
X:PARENT_RIGHT - 195
Y:293
Align:Left
VAlign:Top
Width:70
Height:20
Button@DIRECTCONNECT_BUTTON:
Id:DIRECTCONNECT_BUTTON
X:20
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Direct Connect
Width:710
Height:300
Children:
Container@SERVER_TEMPLATE:
Id:SERVER_TEMPLATE
Width:PARENT_RIGHT-28
Height:25
X:2
Y:0
Visible:false
Children:
Label@TITLE:
X:10
Id:TITLE
Width:200
Height:25
Label@MAP:
Id:MAP
X:PARENT_RIGHT-450
Align:Center
Width:250
Height:25
Label@PLAYERS:
Id:PLAYERS
X:PARENT_RIGHT-200
Align:Center
Width:50
Height:25
Label@IP:
Id:IP
Width:140
X:PARENT_RIGHT-150
Align:Center
Height:25
Container@SERVER_LABELS:
Width:710-25
Height:25
X:15
Y:5
Children:
Label@TITLE:
Width:125
Height:25
X:0
Y:0
Text:Title
Align:Center
Bold:True
Label@MAP:
Id:MAP
X:PARENT_RIGHT-450
Align:Center
Width:250
Height:25
Text:Map
Bold:true
Label@PLAYERS:
Id:PLAYERS
X:PARENT_RIGHT-200
Align:Center
Width:50
Height:25
Text:Players
Bold:true
Label@IP:
Id:IP
Width:140
X:PARENT_RIGHT-150
Align:Center
Height:25
Text:Address
Bold:true
Label@PROGRESS_LABEL:
Id:PROGRESS_LABEL
X:22
Y:150
Width:710
Height:25
Align:Center
Visible:false
Container@SERVER_INFO:
Id:SERVER_INFO
X:15
Y:345
Width:710
Height:140
Visible:false
Background:dialog2
Children:
MapPreview@MAP_PREVIEW:
Id:MAP_PREVIEW
X:10
Y:10
Width:128
Height:128
Container@STATS_BIN
X:200
Y:30
Width:150
Children:
Label@SERVER_IP_LABEL:
Id:SERVER_IP_LABEL
X:0
Y:0
Align:Right
Width:70
Height:20
Text:Server:
Bold:True
Label@SERVER_IP:
Id:SERVER_IP
X:70
Y:0
Align:Left
Width:70
Height:20
Label@MAP_PLAYERS_LABEL:
Id:MAP_PLAYERS_LABEL
X:0
Y:20
Align:Right
Width:70
Height:20
Text:Players:
Bold:True
Label@MAP_PLAYERS:
Id:MAP_PLAYERS
X:70
Y:20
Align:Left
Width:70
Height:20
Label@MAP_TITLE_LABEL:
Id:MAP_TITLE_LABEL
X:0
Y:40
Align:Right
Width:70
Height:20
Text:Map:
Bold:True
Label@MAP_TITLE:
Id:MAP_TITLE
X:70
Y:40
Align:Left
Width:70
Height:20
Label@SERVER_MODS_LABEL:
Id:SERVER_MODS_LABEL
X:0
Y:60
Align:Right
Width:70
Height:20
Text:Mods:
Bold:True
Label@SERVER_MODS:
Id:SERVER_MODS
X:70
Y:63
Align:Left
VAlign:Top
Width:70
Height:20
Button@JOIN_BUTTON:
Id:JOIN_BUTTON
X:0
Y:499
Width:140
Height:35
Visible: false
Text:Join
Bold:True
Button@REFRESH_BUTTON:
Id:REFRESH_BUTTON
X:160
Y:PARENT_BOTTOM - 45
Width:120
Height:25
X:450
Y:499
Width:140
Height:35
Text:Refresh
Bold:True
Button@JOIN_BUTTON:
Id:JOIN_BUTTON
X:PARENT_RIGHT - 140 - 130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Join
Bold:True
Button@CANCEL_BUTTON:
Id:CANCEL_BUTTON
X:PARENT_RIGHT - 140
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Bold:True
Background@DIRECTCONNECT_BG:
Id:DIRECTCONNECT_BG
Delegate:DirectConnectDelegate
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:400
Height:155
Children:
Label@DIRECTCONNECT_LABEL_TITLE:
Id:DIRECTCONNECT_LABEL_TITLE
X:0
Y:20
Width:400
Height:25
Text:Direct Connect
Align:Center
Bold:True
Label@ADDRESS_LABEL:
Id:ADDRESS_LABEL
X:50
Y:59
Width:95
Height:25
Align:Right
Text:Server Address:
TextField@SERVER_ADDRESS:
Id:SERVER_ADDRESS
X:150
Y:60
Width:200
MaxLength:50
Height:25
Button@JOIN_BUTTON:
Id:JOIN_BUTTON
X:130
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Join
Bold:True
Button@CANCEL_BUTTON:
Id:CANCEL_BUTTON
X:260
Y:PARENT_BOTTOM - 45
Width:120
Height:25
Text:Cancel
Bold:True
Background@CONNECTION_FAILED_BG:
Id:CONNECTION_FAILED_BG
Delegate:ConnectionFailedDelegate
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
Height:150
Children:
Label@CONNECTION_FAILED_TITLE:
Id:CONNECTION_FAILED_TITLE
X:0
Y:20
Width:450
Height:25
Text:Connection Failed
Align:Center
Bold:True
Label@CONNECTION_FAILED_DESC:
Id:CONNECTION_FAILED_DESC
X:0
Y:60
Width:PARENT_RIGHT
Height:25
Text:Could not connect to AAA.BBB.CCC.DDD:EEEE
Align:Center
Button@CONNECTION_BUTTON_RETRY:
Id:CONNECTION_BUTTON_RETRY
X:PARENT_RIGHT - 360
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Retry
Bold:True
Button@CONNECTION_BUTTON_CANCEL:
Id:CONNECTION_BUTTON_CANCEL
X:PARENT_RIGHT - 180
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Cancel
Bold:True
Background@CONNECTING_BG:
Id:CONNECTING_BG
Delegate:ConnectionDialogsDelegate
X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2
Width:450
Height:150
Children:
Label@CONNECTING_TITLE:
Id:CONNECTING_TITLE
X:0
Y:20
Width:450
Height:25
Text:Connecting
Align:Center
Bold:True
Label@CONNECTING_DESC:
Id:CONNECTING_DESC
X:0
Y:60
Width:PARENT_RIGHT
Height:25
Text:Connecting to AAA.BBB.CCC.DDD:EEEE...
Align:Center
Button@CONNECTION_BUTTON_ABORT:
Id:CONNECTION_BUTTON_ABORT
X:PARENT_RIGHT - 180
Y:PARENT_BOTTOM - 45
Width:160
Height:25
Text:Abort
Button@BACK_BUTTON:
Id:BACK_BUTTON
X:600
Y:499
Width:140
Height:35
Text:Back
Bold:True

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 530 B