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

@@ -26,6 +26,7 @@ namespace OpenRA.Widgets
public string Width = "0";
public string Height = "0";
public string Delegate = null;
public IWidgetDelegate DelegateObject {get; private set;}
public bool Visible = true;
public readonly List<Widget> Children = new List<Widget>();
@@ -127,8 +128,8 @@ namespace OpenRA.Widgets
args["widget"] = this;
var iwd = Game.modData.ObjectCreator.CreateObject<IWidgetDelegate>(Delegate, args)
as IWidgetDelegateEx;
DelegateObject = Game.modData.ObjectCreator.CreateObject<IWidgetDelegate>(Delegate, args);
var iwd = DelegateObject as IWidgetDelegateEx;
if (iwd != null)
iwd.Init();

View File

@@ -71,6 +71,7 @@
<Compile Include="AttackPopupTurreted.cs" />
<Compile Include="SpawnViceroid.cs" />
<Compile Include="Widgets\CncMenuLogic.cs" />
<Compile Include="Widgets\CncServerBrowserLogic.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

View File

@@ -26,7 +26,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
{
Main,
Multiplayer,
Settings
Settings,
None
}
MenuType Menu = MenuType.Main;
@@ -46,7 +47,18 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
var multiplayerMenu = widget.GetWidget("MULTIPLAYER_MENU");
multiplayerMenu.IsVisible = () => Menu == MenuType.Multiplayer;
multiplayerMenu.GetWidget("BACK_BUTTON").OnMouseUp = mi => { Menu = MenuType.Main; return true; };
multiplayerMenu.GetWidget("JOIN_BUTTON").OnMouseUp = mi =>
{
Menu = MenuType.None;
Widget.OpenWindow("SERVERBROWSER_PANEL",
new Dictionary<string, object>()
{
{"onExit", new Action(() => {Menu = MenuType.Multiplayer; Widget.CloseWindow();})}
});
return true;
};
// Settings menu
var settingsMenu = widget.GetWidget("SETTINGS_MENU");

View File

@@ -0,0 +1,193 @@
#region Copyright & License Information
/*
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Server;
using OpenRA.Widgets;
using OpenRA.Mods.RA.Widgets.Delegates;
namespace OpenRA.Mods.Cnc.Widgets
{
public class CncServerBrowserLogic : IWidgetDelegate
{
// Prevent repeated additions of RefreshServerList to the master server
static bool masterServerSetup;
GameServer currentServer = null;
Widget serverTemplate;
enum SearchStatus
{
Fetching,
Failed,
NoGames,
Hidden
}
SearchStatus searchStatus = SearchStatus.Fetching;
public string ProgressLabelText()
{
switch (searchStatus)
{
case SearchStatus.Fetching:
return "Fetching game list...";
case SearchStatus.Failed:
return "Failed to contact master server.";
case SearchStatus.NoGames:
return "No games found.";
default:
return "";
}
}
[ObjectCreator.UseCtor]
public CncServerBrowserLogic( [ObjectCreator.Param] Widget widget, [ObjectCreator.Param] Action onExit )
{
var panel = widget.GetWidget("SERVERBROWSER_PANEL");
var sl = panel.GetWidget<ScrollPanelWidget>("SERVER_LIST");
// Menu buttons
panel.GetWidget("REFRESH_BUTTON").OnMouseUp = mi =>
{
searchStatus = SearchStatus.Fetching;
sl.RemoveChildren();
MasterServerQuery.Refresh(Game.Settings.Server.MasterServer);
return true;
};
var join = panel.GetWidget("JOIN_BUTTON");
join.IsVisible = () => currentServer != null && ServerBrowserDelegate.CanJoin(currentServer);
join.OnMouseUp = mi =>
{
if (currentServer == null)
return false;
Widget.CloseWindow();
Game.JoinServer(currentServer.Address.Split(':')[0], int.Parse(currentServer.Address.Split(':')[1]));
return true;
};
panel.GetWidget("BACK_BUTTON").OnMouseUp = mi => { onExit(); return true; };
// Server list
serverTemplate = sl.GetWidget("SERVER_TEMPLATE");
// Display the progress label over the server list
// The text is only visible when the list is empty
var progressText = panel.GetWidget<LabelWidget>("PROGRESS_LABEL");
progressText.IsVisible = () => searchStatus != SearchStatus.Hidden;
progressText.GetText = ProgressLabelText;
// Server info
var infoPanel = panel.GetWidget("SERVER_INFO");
infoPanel.IsVisible = () => currentServer != null;
var preview = infoPanel.GetWidget<MapPreviewWidget>("MAP_PREVIEW");
preview.Map = () => CurrentMap();
preview.IsVisible = () => CurrentMap() != null;
infoPanel.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address;
infoPanel.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => ServerBrowserDelegate.GenerateModsLabel(currentServer);
infoPanel.GetWidget<LabelWidget>("MAP_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown";
infoPanel.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () =>
{
if (currentServer == null)
return "";
string ret = currentServer.Players.ToString();
if (CurrentMap() != null)
ret += "/" + CurrentMap().PlayerCount.ToString();
return ret;
};
// Master server should be set up *once*
if (!masterServerSetup)
{
masterServerSetup = true;
MasterServerQuery.OnComplete += games => RefreshServerListStub(games);
}
MasterServerQuery.Refresh(Game.Settings.Server.MasterServer);
}
Map CurrentMap()
{
return (currentServer == null) ? null : GetMap(currentServer.Map);
}
static Map GetMap(string uid)
{
return (!Game.modData.AvailableMaps.ContainsKey(uid))
? null : Game.modData.AvailableMaps[uid];
}
public void RefreshServerList(IEnumerable<GameServer> games)
{
var sl = Widget.RootWidget.GetWidget("SERVERBROWSER_PANEL")
.GetWidget<ScrollPanelWidget>("SERVER_LIST");
sl.RemoveChildren();
currentServer = null;
if (games == null)
{
searchStatus = SearchStatus.Failed;
return;
}
var gamesWaiting = games.Where(g => ServerBrowserDelegate.CanJoin(g));
if (gamesWaiting.Count() == 0)
{
searchStatus = SearchStatus.NoGames;
return;
}
searchStatus = SearchStatus.Hidden;
int i = 0;
foreach (var loop in gamesWaiting)
{
var game = loop;
var template = serverTemplate.Clone() as ContainerWidget;
template.GetBackground = () => (currentServer == game) ? "dialog2" : null;
template.OnMouseDown = mi => { if (mi.Button != MouseButton.Left) return false; currentServer = game; return true; };
template.IsVisible = () => true;
template.GetWidget<LabelWidget>("TITLE").GetText = () => game.Name;
template.GetWidget<LabelWidget>("MAP").GetText = () => {var map = GetMap(game.Map); return map == null ? "Unknown" : map.Title;};
template.GetWidget<LabelWidget>("PLAYERS").GetText = () => "{0} / {1}".F(game.Players, -1);
template.GetWidget<LabelWidget>("IP").GetText = () => game.Address;
sl.AddChild(template);
if (i == 0) currentServer = game;
i++;
}
}
static void RefreshServerListStub(IEnumerable<GameServer> games)
{
var panel = Widget.RootWidget.GetWidget("SERVERBROWSER_PANEL");
// The panel may not be open anymore
if (panel == null)
return;
var browserLogic = panel.DelegateObject as CncServerBrowserLogic;
if (browserLogic == null)
return;
browserLogic.RefreshServerList(games);
}
}
}

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
preview.IsVisible = () => CurrentMap() != null;
bg.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address;
bg.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => GenerateModsLabel();
bg.GetWidget<LabelWidget>("SERVER_MODS").GetText = () => GenerateModsLabel(currentServer);
bg.GetWidget<LabelWidget>("MAP_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown";
bg.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () =>
{
@@ -103,9 +103,9 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
? null : Game.modData.AvailableMaps[currentServer.Map];
}
string GenerateModsLabel()
public static string GenerateModsLabel(GameServer s)
{
return string.Join("\n", currentServer.UsefulMods
return string.Join("\n", s.UsefulMods
.Select(m =>
Mod.AllMods.ContainsKey(m.Key) ? string.Format("{0} ({1})", Mod.AllMods[m.Key].Title, m.Value)
: string.Format("Unknown Mod: {0}",m.Key)).ToArray());
@@ -161,7 +161,7 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
}
}
bool CanJoin(GameServer game)
public static bool CanJoin(GameServer game)
{
//"waiting for players"
if (game.State != 1)

View File

@@ -28,7 +28,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="4"
inkscape:cx="-5.452261"
inkscape:cx="30.297739"
inkscape:cy="49.497475"
inkscape:document-units="px"
inkscape:current-layer="layer1"
@@ -75,5 +75,15 @@
width="63"
id="rect3759"
style="fill:#560000;fill-opacity:0.87843138;stroke:#c00000;stroke-width:1;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/Users/paul/src/OpenRA/mods/cnc/uibits/rect3776.png"
y="924.86218"
x="64.5"
height="63"
width="63"
id="rect2984"
style="fill:#000000;fill-opacity:0.75111109;stroke:#800000;stroke-width:1;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

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