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

View File

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

View File

@@ -26,7 +26,8 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
{ {
Main, Main,
Multiplayer, Multiplayer,
Settings Settings,
None
} }
MenuType Menu = MenuType.Main; MenuType Menu = MenuType.Main;
@@ -46,7 +47,18 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
var multiplayerMenu = widget.GetWidget("MULTIPLAYER_MENU"); var multiplayerMenu = widget.GetWidget("MULTIPLAYER_MENU");
multiplayerMenu.IsVisible = () => Menu == MenuType.Multiplayer; multiplayerMenu.IsVisible = () => Menu == MenuType.Multiplayer;
multiplayerMenu.GetWidget("BACK_BUTTON").OnMouseUp = mi => { Menu = MenuType.Main; return true; }; 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 // Settings menu
var settingsMenu = widget.GetWidget("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; preview.IsVisible = () => CurrentMap() != null;
bg.GetWidget<LabelWidget>("SERVER_IP").GetText = () => currentServer.Address; 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_TITLE").GetText = () => (CurrentMap() != null) ? CurrentMap().Title : "Unknown";
bg.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () => bg.GetWidget<LabelWidget>("MAP_PLAYERS").GetText = () =>
{ {
@@ -103,9 +103,9 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
? null : Game.modData.AvailableMaps[currentServer.Map]; ? 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 => .Select(m =>
Mod.AllMods.ContainsKey(m.Key) ? string.Format("{0} ({1})", Mod.AllMods[m.Key].Title, m.Value) Mod.AllMods.ContainsKey(m.Key) ? string.Format("{0} ({1})", Mod.AllMods[m.Key].Title, m.Value)
: string.Format("Unknown Mod: {0}",m.Key)).ToArray()); : 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" //"waiting for players"
if (game.State != 1) if (game.State != 1)

View File

@@ -28,7 +28,7 @@
inkscape:pageopacity="0.0" inkscape:pageopacity="0.0"
inkscape:pageshadow="2" inkscape:pageshadow="2"
inkscape:zoom="4" inkscape:zoom="4"
inkscape:cx="-5.452261" inkscape:cx="30.297739"
inkscape:cy="49.497475" inkscape:cy="49.497475"
inkscape:document-units="px" inkscape:document-units="px"
inkscape:current-layer="layer1" inkscape:current-layer="layer1"
@@ -75,5 +75,15 @@
width="63" width="63"
id="rect3759" 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" /> 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> </g>
</svg> </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-bl: 0,62,2,2
corner-br: 62,62,2,2 corner-br: 62,62,2,2
# Pressed button
dialog3: uibuttons.png dialog3: uibuttons.png
background: 2,2,60,60 background: 2,2,60,60
border-r: 62,2,2,60 border-r: 62,2,2,60
@@ -152,6 +153,7 @@ dialog3: uibuttons.png
corner-bl: 0,62,2,2 corner-bl: 0,62,2,2
corner-br: 62,62,2,2 corner-br: 62,62,2,2
# Normal buttton
dialog2: uibuttons.png dialog2: uibuttons.png
background: 2,66,60,60 background: 2,66,60,60
border-r: 62,66,2,60 border-r: 62,66,2,60
@@ -163,6 +165,18 @@ dialog2: uibuttons.png
corner-bl: 0,126,2,2 corner-bl: 0,126,2,2
corner-br: 62,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 dialog4: dialog4.png
border-t: 5,0,52,6 border-t: 5,0,52,6
border-b: 5,58,52,6 border-b: 5,58,52,6

View File

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

View File

@@ -1,360 +1,207 @@
Background@CREATESERVER_BG: Container@SERVERBROWSER_PANEL:
Id:CREATESERVER_BG Id:SERVERBROWSER_PANEL
Delegate:CreateServerMenuDelegate Delegate:CncServerBrowserLogic
X:(WINDOW_RIGHT - WIDTH)/2 X:(WINDOW_RIGHT - WIDTH)/2
Y:(WINDOW_BOTTOM - HEIGHT)/2 Y:(WINDOW_BOTTOM - 500)/2
Width:400 Width:740
Height:240 Height:535
Children: Children:
Label@LABEL_TITLE: Background@bg:
Id:LABEL_TITLE Width:740
X:0 Height:500
Y:20 Background:panel
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
Children: Children:
Label@SERVER_TEMPLATE: ScrollPanel@SERVER_LIST:
Id:SERVER_TEMPLATE Id:SERVER_LIST
Width:PARENT_RIGHT-28 X:15
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
Y:30 Y:30
Width:192 Width:710
Height:192 Height:300
Label@SERVER_IP_LABEL: Children:
Id:SERVER_IP_LABEL Container@SERVER_TEMPLATE:
X:PARENT_RIGHT - 200 - WIDTH Id:SERVER_TEMPLATE
Y:230 Width:PARENT_RIGHT-28
Align:Right Height:25
Width:70 X:2
Height:20 Y:0
Text:Server: Visible:false
Bold:True Children:
Label@SERVER_IP: Label@TITLE:
Id:SERVER_IP X:10
X:PARENT_RIGHT - 195 Id:TITLE
Y:230 Width:200
Align:Left Height:25
Width:70 Label@MAP:
Height:20 Id:MAP
Label@MAP_PLAYERS_LABEL: X:PARENT_RIGHT-450
Id:MAP_PLAYERS_LABEL Align:Center
X:PARENT_RIGHT - 200 - WIDTH Width:250
Y:250 Height:25
Align:Right Label@PLAYERS:
Width:70 Id:PLAYERS
Height:20 X:PARENT_RIGHT-200
Text:Players: Align:Center
Bold:True Width:50
Label@MAP_PLAYERS: Height:25
Id:MAP_PLAYERS Label@IP:
X:PARENT_RIGHT - 195 Id:IP
Y:250 Width:140
Align:Left X:PARENT_RIGHT-150
Width:70 Align:Center
Height:20 Height:25
Label@MAP_TITLE_LABEL: Container@SERVER_LABELS:
Id:MAP_TITLE_LABEL Width:710-25
X:PARENT_RIGHT - 200 - WIDTH Height:25
Y:270 X:15
Align:Right Y:5
Width:70 Children:
Height:20 Label@TITLE:
Text:Map: Width:125
Bold:True Height:25
Label@MAP_TITLE: X:0
Id:MAP_TITLE Y:0
X:PARENT_RIGHT - 195 Text:Title
Y:270 Align:Center
Align:Left Bold:True
Width:70 Label@MAP:
Height:20 Id:MAP
Label@SERVER_MODS_LABEL: X:PARENT_RIGHT-450
Id:SERVER_MODS_LABEL Align:Center
X:PARENT_RIGHT - 200 - WIDTH Width:250
Y:290 Height:25
Align:Right Text:Map
Width:70 Bold:true
Height:20 Label@PLAYERS:
Text:Mods: Id:PLAYERS
Bold:True X:PARENT_RIGHT-200
Label@SERVER_MODS: Align:Center
Id:SERVER_MODS Width:50
X:PARENT_RIGHT - 195 Height:25
Y:293 Text:Players
Align:Left Bold:true
VAlign:Top Label@IP:
Width:70 Id:IP
Height:20 Width:140
Button@DIRECTCONNECT_BUTTON: X:PARENT_RIGHT-150
Id:DIRECTCONNECT_BUTTON Align:Center
X:20 Height:25
Y:PARENT_BOTTOM - 45 Text:Address
Width:120 Bold:true
Height:25 Label@PROGRESS_LABEL:
Text:Direct Connect 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 Bold:True
Button@REFRESH_BUTTON: Button@REFRESH_BUTTON:
Id:REFRESH_BUTTON Id:REFRESH_BUTTON
X:160 X:450
Y:PARENT_BOTTOM - 45 Y:499
Width:120 Width:140
Height:25 Height:35
Text:Refresh Text:Refresh
Bold:True Bold:True
Button@JOIN_BUTTON: Button@BACK_BUTTON:
Id:JOIN_BUTTON Id:BACK_BUTTON
X:PARENT_RIGHT - 140 - 130 X:600
Y:PARENT_BOTTOM - 45 Y:499
Width:120 Width:140
Height:25 Height:35
Text:Join Text:Back
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
Bold:True Bold:True

Binary file not shown.

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 530 B