Overhaul the server browser.

This commit is contained in:
Paul Chote
2015-10-22 22:59:52 +01:00
parent 2a210a7314
commit c0f42904f0
38 changed files with 1272 additions and 894 deletions

View File

@@ -566,7 +566,6 @@
<Compile Include="Widgets\Logic\ConnectionLogic.cs" /> <Compile Include="Widgets\Logic\ConnectionLogic.cs" />
<Compile Include="Widgets\Logic\FactionTooltipLogic.cs" /> <Compile Include="Widgets\Logic\FactionTooltipLogic.cs" />
<Compile Include="Widgets\Logic\CreditsLogic.cs" /> <Compile Include="Widgets\Logic\CreditsLogic.cs" />
<Compile Include="Widgets\Logic\DirectConnectLogic.cs" />
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" /> <Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\AddFactionSuffixLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\AddFactionSuffixLogic.cs" />
<Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" /> <Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" />
@@ -620,7 +619,6 @@
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" /> <Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" /> <Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" /> <Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" /> <Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
<Compile Include="Widgets\Logic\SettingsLogic.cs" /> <Compile Include="Widgets\Logic\SettingsLogic.cs" />
<Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" /> <Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" />
@@ -706,6 +704,7 @@
<Compile Include="Widgets\Logic\GlobalChatLogic.cs" /> <Compile Include="Widgets\Logic\GlobalChatLogic.cs" />
<Compile Include="Lint\CheckChromeLogic.cs" /> <Compile Include="Lint\CheckChromeLogic.cs" />
<Compile Include="Lint\CheckMapMetadata.cs" /> <Compile Include="Lint\CheckMapMetadata.cs" />
<Compile Include="Widgets\Logic\MultiplayerLogic.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>

View File

@@ -1,43 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2015 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 OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic
{
public class DirectConnectLogic : ChromeLogic
{
[ObjectCreator.UseCtor]
public DirectConnectLogic(Widget widget, Action onExit, Action openLobby)
{
var panel = widget;
var ipField = panel.Get<TextFieldWidget>("IP");
var portField = panel.Get<TextFieldWidget>("PORT");
var last = Game.Settings.Player.LastServer.Split(':');
ipField.Text = last.Length > 1 ? last[0] : "localhost";
portField.Text = last.Length == 2 ? last[1] : "1234";
panel.Get<ButtonWidget>("JOIN_BUTTON").OnClick = () =>
{
var port = Exts.WithDefault(1234, () => Exts.ParseIntegerInvariant(portField.Text));
Game.Settings.Player.LastServer = "{0}:{1}".F(ipField.Text, port);
Game.Settings.Save();
Ui.CloseWindow();
ConnectionLogic.Connect(ipField.Text, port, "", openLobby, onExit);
};
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
}
}
}

View File

@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
mainMenu.Get<ButtonWidget>("MULTIPLAYER_BUTTON").OnClick = () => mainMenu.Get<ButtonWidget>("MULTIPLAYER_BUTTON").OnClick = () =>
{ {
menuType = MenuType.None; menuType = MenuType.None;
Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
{ {
{ "onStart", RemoveShellmapUI }, { "onStart", RemoveShellmapUI },
{ "onExit", () => menuType = MenuType.Main }, { "onExit", () => menuType = MenuType.Main },
@@ -220,7 +220,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Game.OnRemoteDirectConnect += (host, port) => Game.OnRemoteDirectConnect += (host, port) =>
{ {
menuType = MenuType.None; menuType = MenuType.None;
Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
{ {
{ "onStart", RemoveShellmapUI }, { "onStart", RemoveShellmapUI },
{ "onExit", () => menuType = MenuType.Main }, { "onExit", () => menuType = MenuType.Main },

View File

@@ -20,10 +20,14 @@ using OpenRA.Widgets;
namespace OpenRA.Mods.Common.Widgets.Logic namespace OpenRA.Mods.Common.Widgets.Logic
{ {
public class ServerBrowserLogic : ChromeLogic public class MultiplayerLogic : ChromeLogic
{ {
static readonly Action DoNothing = () => { }; static readonly Action DoNothing = () => { };
enum PanelType { Browser, DirectConnect, CreateServer }
PanelType panel = PanelType.Browser;
readonly Color incompatibleVersionColor;
readonly Color incompatibleProtectedGameColor; readonly Color incompatibleProtectedGameColor;
readonly Color protectedGameColor; readonly Color protectedGameColor;
readonly Color incompatibleWaitingGameColor; readonly Color incompatibleWaitingGameColor;
@@ -31,18 +35,20 @@ namespace OpenRA.Mods.Common.Widgets.Logic
readonly Color incompatibleGameStartedColor; readonly Color incompatibleGameStartedColor;
readonly Color gameStartedColor; readonly Color gameStartedColor;
readonly Color incompatibleGameColor; readonly Color incompatibleGameColor;
readonly Color cantJoinGameColor;
GameServer currentServer; GameServer currentServer;
MapPreview currentMap;
ScrollItemWidget serverTemplate; ScrollItemWidget serverTemplate;
ScrollItemWidget headerTemplate; ScrollItemWidget headerTemplate;
Action onStart; Action onStart;
Action onExit;
enum SearchStatus { Fetching, Failed, NoGames, Hidden } enum SearchStatus { Fetching, Failed, NoGames, Hidden }
SearchStatus searchStatus = SearchStatus.Fetching; SearchStatus searchStatus = SearchStatus.Fetching;
Download currentQuery; Download currentQuery;
Widget panel, serverList; Widget serverList;
bool showWaiting = true; bool showWaiting = true;
bool showEmpty = true; bool showEmpty = true;
@@ -55,87 +61,52 @@ namespace OpenRA.Mods.Common.Widgets.Logic
switch (searchStatus) switch (searchStatus)
{ {
case SearchStatus.Failed: return "Failed to contact master server."; case SearchStatus.Failed: return "Failed to contact master server.";
case SearchStatus.NoGames: return "No games found."; case SearchStatus.NoGames: return "No games found. Try changing filters.";
default: return ""; default: return "";
} }
} }
[ObjectCreator.UseCtor] [ObjectCreator.UseCtor]
public ServerBrowserLogic(Widget widget, Action onStart, Action onExit, string directConnectHost, int directConnectPort) public MultiplayerLogic(Widget widget, Action onStart, Action onExit, string directConnectHost, int directConnectPort)
{ {
panel = widget;
this.onStart = onStart; this.onStart = onStart;
this.onExit = onExit;
incompatibleVersionColor = ChromeMetrics.Get<Color>("IncompatibleVersionColor");
incompatibleGameColor = ChromeMetrics.Get<Color>("IncompatibleGameColor"); incompatibleGameColor = ChromeMetrics.Get<Color>("IncompatibleGameColor");
cantJoinGameColor = ChromeMetrics.Get<Color>("CantJoinGameColor");
protectedGameColor = ChromeMetrics.Get<Color>("ProtectedGameColor");
incompatibleProtectedGameColor = ChromeMetrics.Get<Color>("IncompatibleProtectedGameColor"); incompatibleProtectedGameColor = ChromeMetrics.Get<Color>("IncompatibleProtectedGameColor");
protectedGameColor = ChromeMetrics.Get<Color>("ProtectedGameColor");
waitingGameColor = ChromeMetrics.Get<Color>("WaitingGameColor"); waitingGameColor = ChromeMetrics.Get<Color>("WaitingGameColor");
incompatibleWaitingGameColor = ChromeMetrics.Get<Color>("IncompatibleWaitingGameColor"); incompatibleWaitingGameColor = ChromeMetrics.Get<Color>("IncompatibleWaitingGameColor");
gameStartedColor = ChromeMetrics.Get<Color>("GameStartedColor"); gameStartedColor = ChromeMetrics.Get<Color>("GameStartedColor");
incompatibleGameStartedColor = ChromeMetrics.Get<Color>("IncompatibleGameStartedColor"); incompatibleGameStartedColor = ChromeMetrics.Get<Color>("IncompatibleGameStartedColor");
serverList = panel.Get<ScrollPanelWidget>("SERVER_LIST"); LoadBrowserPanel(widget);
headerTemplate = serverList.Get<ScrollItemWidget>("HEADER_TEMPLATE"); LoadDirectConnectPanel(widget);
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE"); LoadCreateServerPanel(widget);
// Menu buttons // Filter and refresh buttons act on the browser panel,
var refreshButton = panel.Get<ButtonWidget>("REFRESH_BUTTON"); // but remain visible (disabled) on the other panels
refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching; var refreshButton = widget.Get<ButtonWidget>("REFRESH_BUTTON");
refreshButton.GetText = () => searchStatus == SearchStatus.Fetching ? "Refreshing..." : "Refresh"; refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching || panel != PanelType.Browser;
refreshButton.OnClick = RefreshServerList;
panel.Get<ButtonWidget>("DIRECTCONNECT_BUTTON").OnClick = OpenDirectConnectPanel; var filtersButton = widget.GetOrNull<DropDownButtonWidget>("FILTERS_DROPDOWNBUTTON");
panel.Get<ButtonWidget>("CREATE_BUTTON").OnClick = OpenCreateServerPanel; filtersButton.IsDisabled = () => searchStatus == SearchStatus.Fetching || panel != PanelType.Browser;
var join = panel.Get<ButtonWidget>("JOIN_BUTTON"); var browserTab = widget.Get<ButtonWidget>("BROWSER_TAB");
join.IsDisabled = () => currentServer == null || !currentServer.IsJoinable; browserTab.IsHighlighted = () => panel == PanelType.Browser;
join.OnClick = () => Join(currentServer); browserTab.OnClick = () => panel = PanelType.Browser;
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); }; var directConnectTab = widget.Get<ButtonWidget>("DIRECTCONNECT_TAB");
directConnectTab.IsHighlighted = () => panel == PanelType.DirectConnect;
directConnectTab.OnClick = () => panel = PanelType.DirectConnect;
// Display the progress label over the server list var createServerTab = widget.Get<ButtonWidget>("CREATE_TAB");
// The text is only visible when the list is empty createServerTab.IsHighlighted = () => panel == PanelType.CreateServer;
var progressText = panel.Get<LabelWidget>("PROGRESS_LABEL"); createServerTab.OnClick = () => panel = PanelType.CreateServer;
progressText.IsVisible = () => searchStatus != SearchStatus.Hidden;
progressText.GetText = ProgressLabelText;
var showWaitingCheckbox = panel.GetOrNull<CheckboxWidget>("WAITING_FOR_PLAYERS"); widget.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
if (showWaitingCheckbox != null) Game.LoadWidget(null, "GLOBALCHAT_PANEL", widget.Get("GLOBALCHAT_ROOT"), new WidgetArgs());
{
showWaitingCheckbox.IsChecked = () => showWaiting;
showWaitingCheckbox.OnClick = () => { showWaiting ^= true; RefreshServerList(); };
}
var showEmptyCheckbox = panel.GetOrNull<CheckboxWidget>("EMPTY");
if (showEmptyCheckbox != null)
{
showEmptyCheckbox.IsChecked = () => showEmpty;
showEmptyCheckbox.OnClick = () => { showEmpty ^= true; RefreshServerList(); };
}
var showAlreadyStartedCheckbox = panel.GetOrNull<CheckboxWidget>("ALREADY_STARTED");
if (showAlreadyStartedCheckbox != null)
{
showAlreadyStartedCheckbox.IsChecked = () => showStarted;
showAlreadyStartedCheckbox.OnClick = () => { showStarted ^= true; RefreshServerList(); };
}
var showProtectedCheckbox = panel.GetOrNull<CheckboxWidget>("PASSWORD_PROTECTED");
if (showProtectedCheckbox != null)
{
showProtectedCheckbox.IsChecked = () => showProtected;
showProtectedCheckbox.OnClick = () => { showProtected ^= true; RefreshServerList(); };
}
var showIncompatibleCheckbox = panel.GetOrNull<CheckboxWidget>("INCOMPATIBLE_VERSION");
if (showIncompatibleCheckbox != null)
{
showIncompatibleCheckbox.IsChecked = () => showIncompatible;
showIncompatibleCheckbox.OnClick = () => { showIncompatible ^= true; RefreshServerList(); };
}
Game.LoadWidget(null, "GLOBALCHAT_PANEL", panel.Get("GLOBALCHAT_ROOT"), new WidgetArgs());
RefreshServerList(); RefreshServerList();
@@ -152,6 +123,158 @@ namespace OpenRA.Mods.Common.Widgets.Logic
} }
} }
void LoadBrowserPanel(Widget widget)
{
var browserPanel = Game.LoadWidget(null, "MULTIPLAYER_BROWSER_PANEL", widget.Get("TOP_PANELS_ROOT"), new WidgetArgs());
browserPanel.IsVisible = () => panel == PanelType.Browser;
serverList = browserPanel.Get<ScrollPanelWidget>("SERVER_LIST");
headerTemplate = serverList.Get<ScrollItemWidget>("HEADER_TEMPLATE");
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
var join = widget.Get<ButtonWidget>("JOIN_BUTTON");
join.IsDisabled = () => currentServer == null || !currentServer.IsJoinable;
join.OnClick = () => Join(currentServer);
// Display the progress label over the server list
// The text is only visible when the list is empty
var progressText = widget.Get<LabelWidget>("PROGRESS_LABEL");
progressText.IsVisible = () => searchStatus != SearchStatus.Hidden;
progressText.GetText = ProgressLabelText;
var filtersPanel = Ui.LoadWidget("MULTIPLAYER_FILTER_PANEL", null, new WidgetArgs());
var showWaitingCheckbox = filtersPanel.GetOrNull<CheckboxWidget>("WAITING_FOR_PLAYERS");
if (showWaitingCheckbox != null)
{
showWaitingCheckbox.IsChecked = () => showWaiting;
showWaitingCheckbox.OnClick = () => { showWaiting ^= true; RefreshServerList(); };
}
var showEmptyCheckbox = filtersPanel.GetOrNull<CheckboxWidget>("EMPTY");
if (showEmptyCheckbox != null)
{
showEmptyCheckbox.IsChecked = () => showEmpty;
showEmptyCheckbox.OnClick = () => { showEmpty ^= true; RefreshServerList(); };
}
var showAlreadyStartedCheckbox = filtersPanel.GetOrNull<CheckboxWidget>("ALREADY_STARTED");
if (showAlreadyStartedCheckbox != null)
{
showAlreadyStartedCheckbox.IsChecked = () => showStarted;
showAlreadyStartedCheckbox.OnClick = () => { showStarted ^= true; RefreshServerList(); };
}
var showProtectedCheckbox = filtersPanel.GetOrNull<CheckboxWidget>("PASSWORD_PROTECTED");
if (showProtectedCheckbox != null)
{
showProtectedCheckbox.IsChecked = () => showProtected;
showProtectedCheckbox.OnClick = () => { showProtected ^= true; RefreshServerList(); };
}
var showIncompatibleCheckbox = filtersPanel.GetOrNull<CheckboxWidget>("INCOMPATIBLE_VERSION");
if (showIncompatibleCheckbox != null)
{
showIncompatibleCheckbox.IsChecked = () => showIncompatible;
showIncompatibleCheckbox.OnClick = () => { showIncompatible ^= true; RefreshServerList(); };
}
var filtersButton = widget.GetOrNull<DropDownButtonWidget>("FILTERS_DROPDOWNBUTTON");
if (filtersButton != null)
{
filtersButton.OnMouseDown = _ =>
{
filtersButton.RemovePanel();
filtersButton.AttachPanel(filtersPanel);
};
}
var refreshButton = widget.Get<ButtonWidget>("REFRESH_BUTTON");
refreshButton.GetText = () => searchStatus == SearchStatus.Fetching ? "Refreshing..." : "Refresh";
refreshButton.OnClick = RefreshServerList;
var mapPreview = widget.GetOrNull<MapPreviewWidget>("SELECTED_MAP_PREVIEW");
if (mapPreview != null)
mapPreview.Preview = () => currentMap;
var mapTitle = widget.GetOrNull<LabelWidget>("SELECTED_MAP");
if (mapTitle != null)
mapTitle.GetText = () => currentMap != null ? currentMap.Title : "No Server Selected";
var ip = widget.GetOrNull<LabelWidget>("SELECTED_IP");
if (ip != null)
{
ip.IsVisible = () => currentServer != null;
ip.GetText = () => currentServer.Address;
}
var status = widget.GetOrNull<LabelWidget>("SELECTED_STATUS");
if (status != null)
{
status.IsVisible = () => currentServer != null;
status.GetText = () => GetStateLabel(currentServer);
status.GetColor = () => GetStateColor(currentServer, status);
}
var modVersion = widget.GetOrNull<LabelWidget>("SELECTED_MOD_VERSION");
if (modVersion != null)
{
modVersion.IsVisible = () => currentServer != null;
modVersion.GetText = () => currentServer.ModLabel;
modVersion.GetColor = () => currentServer.IsCompatible ? modVersion.TextColor : incompatibleVersionColor;
}
var players = widget.GetOrNull<LabelWidget>("SELECTED_PLAYERS");
if (players != null)
{
players.IsVisible = () => currentServer != null;
players.GetText = () => PlayersLabel(currentServer);
}
}
void LoadDirectConnectPanel(Widget widget)
{
var directConnectPanel = Game.LoadWidget(null, "MULTIPLAYER_DIRECTCONNECT_PANEL",
widget.Get("TOP_PANELS_ROOT"), new WidgetArgs());
directConnectPanel.IsVisible = () => panel == PanelType.DirectConnect;
var ipField = directConnectPanel.Get<TextFieldWidget>("IP");
var portField = directConnectPanel.Get<TextFieldWidget>("PORT");
var last = Game.Settings.Player.LastServer.Split(':');
ipField.Text = last.Length > 1 ? last[0] : "localhost";
portField.Text = last.Length == 2 ? last[1] : "1234";
directConnectPanel.Get<ButtonWidget>("JOIN_BUTTON").OnClick = () =>
{
var port = Exts.WithDefault(1234, () => Exts.ParseIntegerInvariant(portField.Text));
Game.Settings.Player.LastServer = "{0}:{1}".F(ipField.Text, port);
Game.Settings.Save();
ConnectionLogic.Connect(ipField.Text, port, "", OpenLobby, DoNothing);
};
}
void LoadCreateServerPanel(Widget widget)
{
var createServerPanel = Game.LoadWidget(null, "MULTIPLAYER_CREATESERVER_PANEL",
widget.Get("TOP_PANELS_ROOT"), new WidgetArgs
{
{ "openLobby", OpenLobby },
{ "onExit", DoNothing }
});
createServerPanel.IsVisible = () => panel == PanelType.CreateServer;
}
string PlayersLabel(GameServer game)
{
return "{0}{1}{2}".F(
"{0} Player{1}".F(game.Players > 0 ? game.Players.ToString() : "No", game.Players != 1 ? "s" : ""),
game.Bots > 0 ? ", {0} Bot{1}".F(game.Bots, game.Bots != 1 ? "s" : "") : "",
game.Spectators > 0 ? ", {0} Spectator{1}".F(game.Spectators, game.Spectators != 1 ? "s" : "") : "");
}
void RefreshServerList() void RefreshServerList()
{ {
// Query in progress // Query in progress
@@ -196,6 +319,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return 1; return 1;
} }
void SelectServer(GameServer server)
{
currentServer = server;
currentMap = server != null ? Game.ModData.MapCache[server.Map] : null;
}
void RefreshServerListInner(IEnumerable<GameServer> games) void RefreshServerListInner(IEnumerable<GameServer> games)
{ {
if (games == null) if (games == null)
@@ -205,6 +334,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
.OrderByDescending(g => GroupSortOrder(g.First())) .OrderByDescending(g => GroupSortOrder(g.First()))
.ThenByDescending(g => g.Count()); .ThenByDescending(g => g.Count());
ScrollItemWidget nextServerRow = null;
var rows = new List<Widget>(); var rows = new List<Widget>();
foreach (var modGames in mods) foreach (var modGames in mods)
{ {
@@ -224,49 +354,39 @@ namespace OpenRA.Mods.Common.Widgets.Logic
continue; continue;
var canJoin = game.IsJoinable; var canJoin = game.IsJoinable;
var compatible = game.IsCompatible; var item = ScrollItemWidget.Setup(serverTemplate, () => currentServer == game, () => SelectServer(game), () => Join(game));
var item = ScrollItemWidget.Setup(serverTemplate, () => currentServer == game, () => currentServer = game, () => Join(game));
var map = Game.ModData.MapCache[game.Map];
var preview = item.GetOrNull<MapPreviewWidget>("MAP_PREVIEW");
if (preview != null)
preview.Preview = () => map;
var title = item.GetOrNull<LabelWidget>("TITLE"); var title = item.GetOrNull<LabelWidget>("TITLE");
if (title != null) if (title != null)
{ {
title.GetText = () => game.Name; title.GetText = () => game.Name;
title.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : title.TextColor; title.GetColor = () => canJoin ? title.TextColor : incompatibleGameColor;
} }
var maptitle = item.GetOrNull<LabelWidget>("MAP"); var password = item.GetOrNull<ImageWidget>("PASSWORD_PROTECTED");
if (maptitle != null) if (password != null)
{ {
maptitle.GetText = () => map.Title; password.IsVisible = () => game.Protected;
maptitle.GetColor = () => !compatible ? Color.DarkGray : !canJoin ? Color.LightGray : maptitle.TextColor; password.GetImageName = () => canJoin ? "protected" : "protected-disabled";
} }
var players = item.GetOrNull<LabelWidget>("PLAYERS"); var players = item.GetOrNull<LabelWidget>("PLAYERS");
if (players != null) if (players != null)
{ {
players.GetText = () => "{0} / {1}".F(game.Players, game.MaxPlayers) players.GetText = () => "{0} / {1}".F(game.Players, game.MaxPlayers)
+ (game.Spectators > 0 ? " ({0} Spectator{1})".F(game.Spectators, game.Spectators > 1 ? "s" : "") : ""); + (game.Spectators > 0 ? " + {0}".F(game.Spectators) : "");
players.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : players.TextColor;
players.GetColor = () => canJoin ? players.TextColor : incompatibleGameColor;
} }
var state = item.GetOrNull<LabelWidget>("STATE"); var state = item.GetOrNull<LabelWidget>("STATUS");
if (state != null) if (state != null)
{ {
state.GetText = () => GetStateLabel(game); var label = game.State >= (int)ServerState.GameStarted ?
state.GetColor = () => GetStateColor(game, state, !compatible || !canJoin); "Playing" : "Waiting";
} state.GetText = () => label;
var ip = item.GetOrNull<LabelWidget>("IP"); var color = GetStateColor(game, state, !canJoin);
if (ip != null) state.GetColor = () => color;
{
ip.GetText = () => game.Address;
ip.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : ip.TextColor;
} }
var location = item.GetOrNull<LabelWidget>("LOCATION"); var location = item.GetOrNull<LabelWidget>("LOCATION");
@@ -274,9 +394,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
{ {
var cachedServerLocation = GeoIP.LookupCountry(game.Address.Split(':')[0]); var cachedServerLocation = GeoIP.LookupCountry(game.Address.Split(':')[0]);
location.GetText = () => cachedServerLocation; location.GetText = () => cachedServerLocation;
location.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : location.TextColor; location.GetColor = () => canJoin ? location.TextColor : incompatibleGameColor;
} }
if (currentServer != null && game.Address == currentServer.Address)
nextServerRow = item;
rows.Add(item); rows.Add(item);
} }
} }
@@ -284,7 +407,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
Game.RunAfterTick(() => Game.RunAfterTick(() =>
{ {
serverList.RemoveChildren(); serverList.RemoveChildren();
currentServer = null; SelectServer(null);
if (games == null) if (games == null)
{ {
@@ -292,13 +415,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return; return;
} }
if (!games.Any()) if (!rows.Any())
{ {
searchStatus = SearchStatus.NoGames; searchStatus = SearchStatus.NoGames;
return; return;
} }
currentServer = games.FirstOrDefault();
searchStatus = SearchStatus.Hidden; searchStatus = SearchStatus.Hidden;
// Search for any unknown maps // Search for any unknown maps
@@ -307,28 +429,39 @@ namespace OpenRA.Mods.Common.Widgets.Logic
foreach (var row in rows) foreach (var row in rows)
serverList.AddChild(row); serverList.AddChild(row);
if (nextServerRow != null)
nextServerRow.OnClick();
}); });
} }
void OpenLobby() void OpenLobby()
{ {
// Close the multiplayer browser
Ui.CloseWindow();
Action onLobbyExit = () =>
{
// Open a fresh copy of the multiplayer browser
Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
{
{ "onStart", onStart },
{ "onExit", onExit },
{ "directConnectHost", null },
{ "directConnectPort", 0 },
});
Game.Disconnect();
};
Game.OpenWindow("SERVER_LOBBY", new WidgetArgs Game.OpenWindow("SERVER_LOBBY", new WidgetArgs
{ {
{ "onExit", Game.Disconnect },
{ "onStart", onStart }, { "onStart", onStart },
{ "onExit", onLobbyExit },
{ "skirmishMode", false } { "skirmishMode", false }
}); });
} }
void OpenDirectConnectPanel()
{
Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs
{
{ "openLobby", OpenLobby },
{ "onExit", DoNothing }
});
}
void OpenCreateServerPanel() void OpenCreateServerPanel()
{ {
Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs Ui.OpenWindow("CREATESERVER_PANEL", new WidgetArgs
@@ -365,14 +498,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
label += " for {0} minute{1}".F(totalMinutes, totalMinutes > 1 ? "s" : ""); label += " for {0} minute{1}".F(totalMinutes, totalMinutes > 1 ? "s" : "");
} }
return game.Protected ? label + " (Password protected)" : label; return label;
} }
if (game.State == (int)ServerState.WaitingPlayers) if (game.State == (int)ServerState.WaitingPlayers)
{ return game.Protected ? "Password protected" : "Waiting for players";
var label = "Waiting for players";
return game.Protected ? label + " (Password protected)" : label;
}
if (game.State == (int)ServerState.ShuttingDown) if (game.State == (int)ServerState.ShuttingDown)
return "Server shutting down"; return "Server shutting down";
@@ -380,14 +510,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return "Unknown server state"; return "Unknown server state";
} }
Color GetStateColor(GameServer game, LabelWidget label, bool darkened) Color GetStateColor(GameServer game, LabelWidget label, bool darkened = false)
{ {
if (!game.Protected && game.State == (int)ServerState.WaitingPlayers)
return darkened ? incompatibleWaitingGameColor : waitingGameColor;
if (game.Protected && game.State == (int)ServerState.WaitingPlayers) if (game.Protected && game.State == (int)ServerState.WaitingPlayers)
return darkened ? incompatibleProtectedGameColor : protectedGameColor; return darkened ? incompatibleProtectedGameColor : protectedGameColor;
if (game.State == (int)ServerState.WaitingPlayers)
return darkened ? incompatibleWaitingGameColor : waitingGameColor;
if (game.State == (int)ServerState.GameStarted) if (game.State == (int)ServerState.GameStarted)
return darkened ? incompatibleGameStartedColor : gameStartedColor; return darkened ? incompatibleGameStartedColor : gameStartedColor;
@@ -396,13 +526,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
bool Filtered(GameServer game) bool Filtered(GameServer game)
{ {
if ((game.State == (int)ServerState.GameStarted) && !showStarted) if (game.State == (int)ServerState.GameStarted && !showStarted)
return true; return true;
if ((game.State == (int)ServerState.WaitingPlayers) && !showWaiting && game.Players != 0) if (game.State == (int)ServerState.WaitingPlayers && !showWaiting && game.Players != 0)
return true; return true;
if ((game.Players == 0) && !showEmpty) if (game.Players == 0 && !showEmpty)
return true; return true;
if (!game.IsCompatible && !showIncompatible) if (!game.IsCompatible && !showIncompatible)

View File

@@ -33,7 +33,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var settings = Game.Settings; var settings = Game.Settings;
preview = Game.ModData.MapCache[WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map)]; preview = Game.ModData.MapCache[WidgetUtils.ChooseInitialMap(Game.Settings.Server.Map)];
panel.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
panel.Get<ButtonWidget>("CREATE_BUTTON").OnClick = CreateAndJoin; panel.Get<ButtonWidget>("CREATE_BUTTON").OnClick = CreateAndJoin;
var mapButton = panel.GetOrNull<ButtonWidget>("MAP_BUTTON"); var mapButton = panel.GetOrNull<ButtonWidget>("MAP_BUTTON");
@@ -132,7 +131,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return; return;
} }
Ui.CloseWindow();
ConnectionLogic.Connect(IPAddress.Loopback.ToString(), Game.Settings.Server.ListenPort, password, onCreate, onExit); ConnectionLogic.Connect(IPAddress.Loopback.ToString(), Game.Settings.Server.ListenPort, password, onCreate, onExit);
} }
} }

View File

@@ -449,6 +449,8 @@ lobby-bits: chrome.png
colorpicker: 257,33,14,14 colorpicker: 257,33,14,14
huepicker: 388,96,7,15 huepicker: 388,96,7,15
kick: 386,115,11,11 kick: 386,115,11,11
protected: 403,97,10,13
protected-disabled: 403,113,10,13
checkbox-bits: chrome.png checkbox-bits: chrome.png
checked: 272,32,16,16 checked: 272,32,16,16

View File

@@ -1,135 +0,0 @@
Container@CREATESERVER_PANEL:
Logic: ServerCreationLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - 260)/2
Width: 521
Height: 250
Children:
Label@TITLE:
Text: Create Server
Width: PARENT_RIGHT
Y: 0-25
Font: BigBold
Contrast: true
Align: Center
Background@bg:
Width: PARENT_RIGHT
Height: 215
Background: panel-black
Children:
Background@MAP_BG:
X: PARENT_RIGHT-WIDTH-15
Y: 15
Width: 162
Height: 162
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
X: 1
Y: 1
Width: 160
Height: 160
Label@MAP_NAME:
X: PARENT_RIGHT-WIDTH-15
Y: PARENT_BOTTOM - 33
Width: 162
Height: 25
Align: Center
Font: Bold
Label@SERVER_NAME_LABEL:
X: 15
Y: 14
Width: 90
Height: 25
Align: Right
Text: Server Name:
TextField@SERVER_NAME:
X: 110
Y: 15
Width: 215
MaxLength: 50
Height: 25
Text: My OpenRA Server
Label@PASSWORD_LABEL:
X: 10
Y: 49
Width: 95
Height: 25
Align: Right
Text: Password:
PasswordField@PASSWORD:
X: 110
Y: 50
Width: 145
MaxLength: 20
Height: 25
Label@AFTER_PASSWORD_LABEL:
X: 265
Y: 49
Width: 95
Height: 25
Align: Left
Text: (optional)
Label@LISTEN_PORT_LABEL:
X: 15
Y: 84
Width: 90
Height: 25
Align: Right
Text: Port:
TextField@LISTEN_PORT:
X: 110
Y: 85
Width: 50
MaxLength: 5
Height: 25
Text: 1234
Label@EXTERNAL_PORT_LABEL:
X: 180
Y: 84
Width: 90
Height: 25
Align: Right
Text: External Port:
TextField@EXTERNAL_PORT:
X: 275
Y: 85
Width: 50
MaxLength: 5
Height: 25
Text: 1234
Checkbox@ADVERTISE_CHECKBOX:
X: 110
Y: 135
Width: 150
Height: 20
Font: Regular
Text: Advertise Online
Checkbox@UPNP_CHECKBOX:
X: 110
Y: 165
Width: 300
Height: 20
Font: Regular
Text: Automatic port forwarding
Button@BACK_BUTTON:
Key: escape
X: 0
Y: 214
Width: 140
Height: 35
Text: Back
Button@MAP_BUTTON:
X: 231
Y: 214
Width: 140
Height: 35
Text: Choose Map
Button@CREATE_BUTTON:
Key: return
X: 381
Y: 214
Width: 140
Height: 35
Text: Create

View File

@@ -1,58 +0,0 @@
Container@DIRECTCONNECT_PANEL:
Logic: DirectConnectLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - 90)/2
Width: 370
Height: 130
Children:
Label@TITLE:
Width: PARENT_RIGHT
Y: 0-25
Font: BigBold
Contrast: true
Align: Center
Text: Connect to Server
Background@bg:
Width: 370
Height: 95
Background: panel-black
Children:
Label@ADDRESS_LABEL:
X: 50
Y: 14
Width: 95
Height: 25
Align: Right
Text: Address:
TextField@IP:
X: 150
Y: 15
Width: 200
Height: 25
Label@PORT_LABEL:
X: 50
Y: 49
Width: 95
Height: 25
Align: Right
Text: Port:
TextField@PORT:
X: 150
Y: 50
Width: 200
Height: 25
Button@BACK_BUTTON:
Key: escape
X: 0
Y: 94
Width: 140
Height: 35
Text: Back
Button@JOIN_BUTTON:
Key: return
X: 230
Y: 94
Width: 140
Height: 35
Text: Join

View File

@@ -20,8 +20,8 @@ Container@LOBBY_GLOBALCHAT_PANEL:
Font: TinyBold Font: TinyBold
Align: Center Align: Center
ScrollPanel@HISTORY_PANEL: ScrollPanel@HISTORY_PANEL:
Width: 582
Y: 19 Y: 19
Width: 582
Height: PARENT_BOTTOM - 19 Height: PARENT_BOTTOM - 19
ItemSpacing: 5 ItemSpacing: 5
Children: Children:

View File

@@ -0,0 +1,140 @@
Container@MULTIPLAYER_BROWSER_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
Y: 5
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@NAME:
X: 5
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 380
Width: 120
Height: 25
Text: Country
Font: Bold
Label@STATUS:
X: 495
Width: 50
Height: 25
Text: Status
Font: Bold
ScrollPanel@SERVER_LIST:
Y: 30
Width: 582
Height: 249
TopBottomSpacing: 2
Children:
ScrollItem@HEADER_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 20
X: 2
Visible: false
Children:
Label@LABEL:
Y: 0-1
Font: TinyBold
Width: PARENT_RIGHT
Height: 20
Align: Center
ScrollItem@SERVER_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 25
X: 2
Children:
Label@TITLE:
X: 5
Width: 255
Height: 25
Image@PASSWORD_PROTECTED:
X: 272
Y: 6
Width: 8
Height: 10
ImageCollection: lobby-bits
Label@PLAYERS:
X: 290
Width: 85
Height: 25
Label@LOCATION:
X: 380
Width: 120
Height: 25
Label@STATUS:
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
Y: 30 + (249 - HEIGHT) / 2
Width: 582
Height: 25
Font: Bold
Align: Center
Visible: false
Container@SELECTED_SERVER:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: panel-gray
Children:
MapPreview@SELECTED_MAP_PREVIEW:
X: 1
Y: 1
Width: PARENT_RIGHT-2
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@SELECTED_MAP:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@SELECTED_IP:
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Label@SELECTED_STATUS:
Y: 203
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@SELECTED_MOD_VERSION:
Y: 216
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Label@SELECTED_PLAYERS:
Y: 229
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Join

View File

@@ -0,0 +1,129 @@
Container@MULTIPLAYER_CREATESERVER_PANEL:
Logic: ServerCreationLogic
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@TITLE:
Y: 5
Width: 582
Height: 25
Text: Create Server
Align: Center
Font: Bold
ScrollPanel:
Y: 30
Width: 582
Height: 249
Children:
Container:
X: 185
Y: 25
Children:
Label@SERVER_NAME_LABEL:
Y: 14
Width: 95
Height: 25
Align: Right
Text: Server Name:
TextField@SERVER_NAME:
X: 100
Y: 15
Width: 215
MaxLength: 50
Height: 25
Text: My OpenRA Server
Label@PASSWORD_LABEL:
Y: 49
Width: 95
Height: 25
Align: Right
Text: Password:
PasswordField@PASSWORD:
X: 100
Y: 50
Width: 145
MaxLength: 20
Height: 25
Label@AFTER_PASSWORD_LABEL:
X: 255
Y: 49
Width: 95
Height: 25
Align: Left
Text: (optional)
Label@LISTEN_PORT_LABEL:
Y: 84
Width: 95
Height: 25
Align: Right
Text: Port:
TextField@LISTEN_PORT:
X: 100
Y: 85
Width: 50
Height: 25
MaxLength: 5
Text: 1234
Label@EXTERNAL_PORT_LABEL:
X: 170
Y: 84
Width: 90
Height: 25
Align: Right
Text: External Port:
TextField@EXTERNAL_PORT:
X: 265
Y: 85
Width: 50
MaxLength: 5
Height: 25
Text: 1234
Checkbox@ADVERTISE_CHECKBOX:
X: 100
Y: 135
Width: 150
Height: 20
Font: Regular
Text: Advertise Online
Checkbox@UPNP_CHECKBOX:
X: 100
Y: 165
Width: 300
Height: 20
Font: Regular
Text: Automatic port forwarding
Container@SIDEBAR:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: panel-gray
Children:
MapPreview@MAP_PREVIEW:
X: 1
Y: 1
Width: PARENT_RIGHT - 2
Height: PARENT_RIGHT - 2
Label@MAP_NAME:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Button@MAP_BUTTON:
X: PARENT_RIGHT - WIDTH
Y: 284-30
Width: 174
Height: 25
Text: Choose Map
Button@CREATE_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Create

View File

@@ -0,0 +1,95 @@
Container@MULTIPLAYER_DIRECTCONNECT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@TITLE:
Y: 5
Width: 582
Height: 25
Text: Connect to Server
Align: Center
Font: Bold
ScrollPanel:
Y: 30
Width: 582
Height: 249
Children:
Container:
X: 185
Y: 60
Children:
Label@ADDRESS_LABEL:
Y: 14
Width: 95
Height: 25
Align: Right
Text: Address:
TextField@IP:
X: 100
Y: 15
Width: 215
Height: 25
Label@PORT_LABEL:
Y: 49
Width: 95
Height: 25
Align: Right
Text: Port:
TextField@PORT:
X: 100
Y: 50
Width: 50
Height: 25
MaxLength: 5
Container@SIDEBAR:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: panel-gray
Label@TITLE:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Direct Connect
Label@DESCA:
Y: 190
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: Enter the server IP and port in the
Label@DESCB:
Y: 203
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: fields to the left, and then press Join.
Label@DESCC:
Y: 216
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: The mod and game version will be
Label@DESCD:
Y: 229
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: verified when connecting.
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Join

View File

@@ -8,7 +8,7 @@ Container@GLOBALCHAT_PANEL:
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Children: Children:
Background@TOPIC: Background@TOPIC:
Width: 565 Width: 582
Height: 20 Height: 20
Background: panel-transparent Background: panel-transparent
Children: Children:
@@ -20,8 +20,8 @@ Container@GLOBALCHAT_PANEL:
Font: TinyBold Font: TinyBold
Align: Center Align: Center
ScrollPanel@HISTORY_PANEL: ScrollPanel@HISTORY_PANEL:
Width: 565
Y: 19 Y: 19
Width: 582
Height: PARENT_BOTTOM - 49 Height: PARENT_BOTTOM - 49
ItemSpacing: 5 ItemSpacing: 5
Children: Children:
@@ -32,11 +32,19 @@ Container@GLOBALCHAT_PANEL:
WordWrap: True WordWrap: True
TextField@CHAT_TEXTFIELD: TextField@CHAT_TEXTFIELD:
Y: PARENT_BOTTOM - 25 Y: PARENT_BOTTOM - 25
Width: 565 Width: 582
Height: 25 Height: 25
LeftMargin: 60
Children:
Label@LABEL_CHATTYPE:
Y: 0-1
Width: 55
Height: 25
Align: Right
Text: Global:
ScrollPanel@NICKNAME_PANEL: ScrollPanel@NICKNAME_PANEL:
X: 570 X: PARENT_RIGHT-WIDTH
Width: 130 Width: 174
Height: PARENT_BOTTOM - 30 Height: PARENT_BOTTOM - 30
Children: Children:
Container@NICKNAME_TEMPLATE: Container@NICKNAME_TEMPLATE:
@@ -53,11 +61,11 @@ Container@GLOBALCHAT_PANEL:
Width: PARENT_RIGHT-15 Width: PARENT_RIGHT-15
Height: 20 Height: 20
Button@DISCONNECT_BUTTON: Button@DISCONNECT_BUTTON:
X: 570 X: PARENT_RIGHT-WIDTH
Y: PARENT_BOTTOM - 25 Y: PARENT_BOTTOM - 25
Width: 130 Width: 174
Height: 25 Height: 25
Text: Disconnect Text: Leave Chat
Font: Bold Font: Bold
Background@GLOBALCHAT_CONNECT_PANEL: Background@GLOBALCHAT_CONNECT_PANEL:
Width: PARENT_RIGHT Width: PARENT_RIGHT

View File

@@ -0,0 +1,111 @@
Container@MULTIPLAYER_PANEL:
Logic: MultiplayerLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - 560)/2
Width: 800
Height: 575
Children:
Label@TITLE:
Text: Multiplayer
Width: PARENT_RIGHT
Y: 0-25
Font: BigBold
Contrast: true
Align: Center
Background@bg:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 35
Background: panel-black
Children:
DropDownButton@FILTERS_DROPDOWNBUTTON:
X: 15
Y: 284
Width: 147
Height: 25
Text: Filter Games
Button@REFRESH_BUTTON:
X: 167
Y: 284
Width: 100
Height: 25
Text: Refresh
Button@BROWSER_TAB:
X: 272
Y: 278
Width: 105
Height: 31
Text: Browse
Button@DIRECTCONNECT_TAB:
X: 382
Y: 278
Width: 105
Height: 31
Text: Direct IP
Button@CREATE_TAB:
X: 492
Y: 278
Width: 105
Height: 31
Text: Create
Container@TOP_PANELS_ROOT:
X: 15
Width: PARENT_RIGHT - 30
Height: PARENT_BOTTOM
Container@GLOBALCHAT_ROOT:
X: 15
Y: 315
Width: PARENT_RIGHT - 30
Height: PARENT_BOTTOM - 330
TooltipContainer@TOOLTIP_CONTAINER:
Button@BACK_BUTTON:
Key: escape
X: 0
Y: PARENT_BOTTOM - 36
Width: 140
Height: 35
Text: Back
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
Width: 147
Height: 130
Background: panel-black
Children:
Checkbox@WAITING_FOR_PLAYERS:
X: 5
Y: 5
Width: 137
Height: 20
Text: Waiting
TextColor: 50,205,50
Font: Regular
Checkbox@EMPTY:
X: 5
Y: 30
Width: 137
Height: 20
Text: Empty
Font: Regular
Checkbox@PASSWORD_PROTECTED:
X: 5
Y: 55
Width: 137
Height: 20
Text: Protected
TextColor: 255,0,0
Font: Regular
Checkbox@ALREADY_STARTED:
X: 5
Y: 80
Width: 137
Height: 20
Text: Started
TextColor: 255,165,0
Font: Regular
Checkbox@INCOMPATIBLE_VERSION:
X: 5
Y: 105
Width: 137
Height: 20
Text: Incompatible
TextColor: 190,190,190
Font: Regular

View File

@@ -1,170 +0,0 @@
Container@SERVERBROWSER_PANEL:
Logic: ServerBrowserLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 730
Height: 595
Children:
Label@TITLE:
Text: Multiplayer
Width: 740
Y: 0-10
Font: BigBold
Contrast: true
Align: Center
Background@bg:
Width: 730
Height: PARENT_BOTTOM - 30
Background: panel-black
Y: 15
Children:
Container@GLOBALCHAT_ROOT:
X: 15
Y: 15
Width: 700
Height: 260
ScrollPanel@SERVER_LIST:
X: 15
Y: 280
Width: 700
Height: 240
Children:
ScrollItem@HEADER_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 25
X: 2
Visible: false
Children:
Label@LABEL:
Y: 0-1
Font: Bold
Width: PARENT_RIGHT
Height: 25
Align: Center
ScrollItem@SERVER_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 68
X: 2
Y: 0
Children:
MapPreview@MAP_PREVIEW:
X: 2
Y: 2
Width: 64
Height: 64
ShowSpawnPoints: no
Label@TITLE:
X: 70
Width: 200
Height: 25
Font: Bold
Label@MAP:
X: 70
Y: 20
Width: 250
Height: 25
Label@PLAYERS:
X: 70
Y: 40
Width: 50
Height: 25
Label@STATE:
Width: 140
X: PARENT_RIGHT-150
Align: Right
Height: 25
Font: Bold
Label@IP:
Width: 140
X: PARENT_RIGHT-150
Y: 20
Align: Right
Height: 25
Label@LOCATION:
Width: 140
X: PARENT_RIGHT-150
Y: 40
Align: Right
Height: 25
Label@PROGRESS_LABEL:
X: (PARENT_RIGHT - WIDTH) / 2
Y: PARENT_BOTTOM / 2 - HEIGHT + (280 / 2)
Width: 710
Height: 25
Font: Bold
Align: Center
Visible: false
Label@SHOW_LABEL_TITLE:
X: 20
Y: 525
Width: 20
Height: 25
Text: Show:
Font: Bold
Checkbox@WAITING_FOR_PLAYERS:
X: 80
Y: 527
Width: 100
Height: 20
Text: Waiting
TextColor: 50,205,50
Checkbox@EMPTY:
X: 180
Y: 527
Width: 100
Height: 20
Text: Empty
Checkbox@PASSWORD_PROTECTED:
X: 270
Y: 527
Width: 100
Height: 20
Text: Protected
TextColor: 255,0,0
Checkbox@ALREADY_STARTED:
X: 385
Y: 527
Width: 100
Height: 20
Text: Started
TextColor: 255,165,0
Checkbox@INCOMPATIBLE_VERSION:
X: 480
Y: 527
Width: 100
Height: 20
Text: Incompatible
TextColor: 190,190,190
Button@REFRESH_BUTTON:
X: PARENT_RIGHT - WIDTH - 15
Y: 525
Width: 100
Height: 25
Text: Refresh
Button@BACK_BUTTON:
Key: escape
X: 0
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Back
Button@CREATE_BUTTON:
X: PARENT_RIGHT - 140 - 10 - 140 - 10 - 140
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Create
Button@DIRECTCONNECT_BUTTON:
X: PARENT_RIGHT - 140 - 10 - 140
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Direct IP
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - 140
Y: PARENT_BOTTOM - 16
Width: 140
Height: 35
Text: Join

View File

@@ -26,8 +26,8 @@ Metrics:
SpawnColor: 255,255,255 SpawnColor: 255,255,255
SpawnContrastColor: 0,0,0 SpawnContrastColor: 0,0,0
SpawnLabelOffset: 0,1 SpawnLabelOffset: 0,1
IncompatibleVersionColor: 255,0,0
IncompatibleGameColor: 169,169,169 IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0 ProtectedGameColor: 255,0,0
IncompatibleProtectedGameColor: 139,0,0 IncompatibleProtectedGameColor: 139,0,0
WaitingGameColor: 0,255,0 WaitingGameColor: 0,255,0

View File

@@ -91,9 +91,11 @@ Assemblies:
ChromeLayout: ChromeLayout:
./mods/cnc/chrome/mainmenu.yaml ./mods/cnc/chrome/mainmenu.yaml
./mods/cnc/chrome/serverbrowser.yaml ./mods/cnc/chrome/multiplayer.yaml
./mods/cnc/chrome/createserver.yaml ./mods/cnc/chrome/multiplayer-browser.yaml
./mods/cnc/chrome/directconnect.yaml ./mods/cnc/chrome/multiplayer-createserver.yaml
./mods/cnc/chrome/multiplayer-directconnect.yaml
./mods/cnc/chrome/multiplayer-globalchat.yaml
./mods/cnc/chrome/lobby.yaml ./mods/cnc/chrome/lobby.yaml
./mods/cnc/chrome/lobby-mappreview.yaml ./mods/cnc/chrome/lobby-mappreview.yaml
./mods/cnc/chrome/lobby-players.yaml ./mods/cnc/chrome/lobby-players.yaml
@@ -123,7 +125,6 @@ ChromeLayout:
./mods/cnc/chrome/assetbrowser.yaml ./mods/cnc/chrome/assetbrowser.yaml
./mods/cnc/chrome/missionbrowser.yaml ./mods/cnc/chrome/missionbrowser.yaml
./mods/cnc/chrome/editor.yaml ./mods/cnc/chrome/editor.yaml
./mods/cnc/chrome/globalchat.yaml
Voices: Voices:
./mods/cnc/audio/voices.yaml ./mods/cnc/audio/voices.yaml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -155,6 +155,8 @@ lobby-bits: spawnpoints.png
admin: 64,5,7,5 admin: 64,5,7,5
colorpicker: 5,5,22,22 colorpicker: 5,5,22,22
huepicker: 71,0,7,15 huepicker: 71,0,7,15
protected: 79,0,10,13
protected-disabled: 90,0,10,13
strategic: strategic.png strategic: strategic.png
unowned: 0,0,32,32 unowned: 0,0,32,32

View File

@@ -26,8 +26,8 @@ Metrics:
SpawnColor: 255,255,255 SpawnColor: 255,255,255
SpawnContrastColor: 0,0,0 SpawnContrastColor: 0,0,0
SpawnLabelOffset: 0,1 SpawnLabelOffset: 0,1
IncompatibleVersionColor: 255,0,0
IncompatibleGameColor: 169,169,169 IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0 ProtectedGameColor: 255,0,0
IncompatibleProtectedGameColor: 139,0,0 IncompatibleProtectedGameColor: 139,0,0
WaitingGameColor: 0,255,0 WaitingGameColor: 0,255,0

View File

@@ -93,11 +93,12 @@ ChromeLayout:
./mods/ra/chrome/lobby-globalchat.yaml ./mods/ra/chrome/lobby-globalchat.yaml
./mods/d2k/chrome/color-picker.yaml ./mods/d2k/chrome/color-picker.yaml
./mods/ra/chrome/map-chooser.yaml ./mods/ra/chrome/map-chooser.yaml
./mods/ra/chrome/create-server.yaml ./mods/ra/chrome/multiplayer.yaml
./mods/ra/chrome/serverbrowser.yaml ./mods/ra/chrome/multiplayer-browser.yaml
./mods/ra/chrome/multiplayer-createserver.yaml
./mods/ra/chrome/multiplayer-directconnect.yaml
./mods/ra/chrome/multiplayer-globalchat.yaml
./mods/ra/chrome/connection.yaml ./mods/ra/chrome/connection.yaml
./mods/ra/chrome/directconnect.yaml
./mods/ra/chrome/replaybrowser.yaml
./mods/d2k/chrome/dropdowns.yaml ./mods/d2k/chrome/dropdowns.yaml
./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/musicplayer.yaml
./mods/d2k/chrome/tooltips.yaml ./mods/d2k/chrome/tooltips.yaml
@@ -105,7 +106,6 @@ ChromeLayout:
./mods/d2k/chrome/missionbrowser.yaml ./mods/d2k/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml ./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml ./mods/ra/chrome/editor.yaml
./mods/ra/chrome/globalchat.yaml
Weapons: Weapons:
./mods/d2k/weapons.yaml ./mods/d2k/weapons.yaml

View File

@@ -461,6 +461,8 @@ lobby-bits: spawnpoints.png
admin: 64,5,7,5 admin: 64,5,7,5
colorpicker: 5,5,22,22 colorpicker: 5,5,22,22
huepicker: 71,0,7,15 huepicker: 71,0,7,15
protected: 79,0,10,13
protected-disabled: 90,0,10,13
strategic: strategic.png strategic: strategic.png
unowned: 0,0,32,32 unowned: 0,0,32,32

View File

@@ -1,105 +0,0 @@
Background@CREATESERVER_PANEL:
Logic: ServerCreationLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 400
Height: 300
Children:
Label@LABEL_TITLE:
X: 0
Y: 20
Width: 400
Height: 25
Text: Create Server
Align: Center
Font: Bold
Label@SERVER_NAME_LABEL:
X: 50
Y: 59
Width: 95
Height: 25
Align: Right
Text: Game Title:
TextField@SERVER_NAME:
X: 150
Y: 60
Width: 210
MaxLength: 50
Height: 25
Text: OpenRA Game
Label@PASSWORD_LABEL:
X: 50
Y: 94
Width: 95
Height: 25
Align: Right
Text: Password:
PasswordField@PASSWORD:
X: 150
Y: 95
Width: 145
MaxLength: 20
Height: 25
Label@AFTER_PASSWORD_LABEL:
X: 300
Y: 94
Width: 95
Height: 25
Align: Left
Text: (optional)
Label@EXTERNAL_PORT_LABEL:
X: 50
Y: 129
Width: 95
Height: 25
Align: Right
Text: External Port:
TextField@EXTERNAL_PORT:
X: 150
Y: 130
Width: 50
MaxLength: 5
Height: 25
Text: OpenRA Game
Label@LISTEN_PORT_LABEL:
X: 210
Y: 129
Width: 95
Height: 25
Align: Right
Text: Listen Port:
TextField@LISTEN_PORT:
X: 310
Y: 130
Width: 50
MaxLength: 5
Height: 25
Checkbox@UPNP_CHECKBOX:
X: 150
Y: 165
Width: 300
Height: 20
Text: Automatic port forwarding
Checkbox@ADVERTISE_CHECKBOX:
X: 150
Y: 200
Width: 300
Height: 20
Text: Advertise game Online
Button@CREATE_BUTTON:
X: 130
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Text: Create
Font: Bold
Key: return
Button@BACK_BUTTON:
X: 260
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Text: Cancel
Font: Bold
Key: escape

View File

@@ -1,51 +0,0 @@
Background@DIRECTCONNECT_PANEL:
Logic: DirectConnectLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 400
Height: 150
Children:
Label@DIRECTCONNECT_LABEL_TITLE:
X: 0
Y: 20
Width: 400
Height: 25
Text: Connect to Server
Align: Center
Font: Bold
Label@ADDRESS_LABEL:
X: 50
Y: 59
Width: 95
Height: 25
Align: Right
Text: Server Address:
TextField@IP:
X: 150
Y: 60
Width: 160
MaxLength: 50
Height: 25
TextField@PORT:
X: 315
Y: 60
Width: 55
MaxLength: 5
Height: 25
Button@JOIN_BUTTON:
X: 130
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Text: Join
Font: Bold
Key: return
Button@BACK_BUTTON:
X: 260
Y: PARENT_BOTTOM - 45
Width: 120
Height: 25
Text: Cancel
Font: Bold
Key: escape

View File

@@ -49,8 +49,8 @@ Container@LOBBY_GLOBALCHAT_PANEL:
Height: PARENT_BOTTOM - 30 Height: PARENT_BOTTOM - 30
Children: Children:
Container@NICKNAME_TEMPLATE: Container@NICKNAME_TEMPLATE:
Height: 20
Width: PARENT_RIGHT-25 Width: PARENT_RIGHT-25
Height: 20
Children: Children:
Image@INDICATOR: Image@INDICATOR:
ImageCollection: lobby-bits ImageCollection: lobby-bits

View File

@@ -7,11 +7,10 @@ Background@SERVER_LOBBY:
Children: Children:
ColorPreviewManager@COLOR_MANAGER: ColorPreviewManager@COLOR_MANAGER:
Label@SERVER_NAME: Label@SERVER_NAME:
X: 0
Y: 15 Y: 15
Align: Center Align: Center
Width: PARENT_RIGHT Width: PARENT_RIGHT
Height: 20 Height: 25
Font: Bold Font: Bold
Container@MAP_PREVIEW_ROOT: Container@MAP_PREVIEW_ROOT:
X: PARENT_RIGHT-20-WIDTH X: PARENT_RIGHT-20-WIDTH
@@ -85,9 +84,9 @@ Background@SERVER_LOBBY:
ItemSpacing: 2 ItemSpacing: 2
Children: Children:
Container@CHAT_TEMPLATE: Container@CHAT_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27 Width: PARENT_RIGHT-27
Height: 16 Height: 16
X: 2
Children: Children:
Label@TIME: Label@TIME:
X: 3 X: 3

View File

@@ -0,0 +1,142 @@
Container@MULTIPLAYER_BROWSER_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Container@LABEL_CONTAINER:
Y: 5
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@NAME:
X: 5
Width: 255
Height: 25
Text: Server
Align: Center
Font: Bold
Label@PLAYERS:
X: 290
Width: 85
Height: 25
Text: Players
Font: Bold
Label@LOCATION:
X: 380
Width: 120
Height: 25
Text: Country
Font: Bold
Label@STATUS:
X: 495
Width: 50
Height: 25
Text: Status
Font: Bold
ScrollPanel@SERVER_LIST:
Y: 30
Width: 583
Height: 249
TopBottomSpacing: 2
Children:
ScrollItem@HEADER_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27
Height: 20
BaseName: scrollheader
Visible: false
Children:
Label@LABEL:
Y: 0-1
Font: TinyBold
Width: PARENT_RIGHT
Height: 20
Align: Center
ScrollItem@SERVER_TEMPLATE:
X: 2
Width: PARENT_RIGHT-27
Height: 25
Children:
Label@TITLE:
X: 5
Width: 255
Height: 25
Image@PASSWORD_PROTECTED:
X: 272
Y: 6
Width: 8
Height: 10
ImageCollection: lobby-bits
Label@PLAYERS:
X: 290
Width: 85
Height: 25
Label@LOCATION:
X: 380
Width: 120
Height: 25
Label@STATUS:
X: 495
Width: 50
Height: 25
Label@PROGRESS_LABEL:
Y: 30 + (249 - HEIGHT) / 2
Width: 582
Height: 25
Font: Bold
Align: Center
Visible: false
Container@SELECTED_SERVER:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: dialog3
Children:
MapPreview@SELECTED_MAP_PREVIEW:
X: 1
Y: 1
Width: PARENT_RIGHT-2
Height: PARENT_BOTTOM-2
TooltipContainer: TOOLTIP_CONTAINER
Label@SELECTED_MAP:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Label@SELECTED_IP:
Y: 187
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Label@SELECTED_STATUS:
Y: 203
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Label@SELECTED_MOD_VERSION:
Y: 216
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Label@SELECTED_PLAYERS:
Y: 229
Width: PARENT_RIGHT
Height: 25
Font: TinyBold
Align: Center
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Join
Font: Bold

View File

@@ -0,0 +1,131 @@
Container@MULTIPLAYER_CREATESERVER_PANEL:
Logic: ServerCreationLogic
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@TITLE:
Y: 5
Width: 582
Height: 25
Text: Create Server
Align: Center
Font: Bold
ScrollPanel:
Y: 30
Width: 583
Height: 249
Children:
Container:
X: 185
Y: 25
Children:
Label@SERVER_NAME_LABEL:
Y: 14
Width: 95
Height: 25
Align: Right
Text: Server Name:
TextField@SERVER_NAME:
X: 100
Y: 15
Width: 215
MaxLength: 50
Height: 25
Text: My OpenRA Server
Label@PASSWORD_LABEL:
Y: 49
Width: 95
Height: 25
Align: Right
Text: Password:
PasswordField@PASSWORD:
X: 100
Y: 50
Width: 145
MaxLength: 20
Height: 25
Label@AFTER_PASSWORD_LABEL:
X: 255
Y: 49
Width: 95
Height: 25
Align: Left
Text: (optional)
Label@LISTEN_PORT_LABEL:
Y: 84
Width: 95
Height: 25
Align: Right
Text: Port:
TextField@LISTEN_PORT:
X: 100
Y: 85
Width: 50
Height: 25
MaxLength: 5
Text: 1234
Label@EXTERNAL_PORT_LABEL:
X: 170
Y: 84
Width: 90
Height: 25
Align: Right
Text: External Port:
TextField@EXTERNAL_PORT:
X: 265
Y: 85
Width: 50
MaxLength: 5
Height: 25
Text: 1234
Checkbox@ADVERTISE_CHECKBOX:
X: 100
Y: 135
Width: 150
Height: 20
Font: Regular
Text: Advertise Online
Checkbox@UPNP_CHECKBOX:
X: 100
Y: 165
Width: 300
Height: 20
Font: Regular
Text: Automatic port forwarding
Container@SIDEBAR:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: dialog3
Children:
MapPreview@MAP_PREVIEW:
X: 1
Y: 1
Width: PARENT_RIGHT - 2
Height: PARENT_RIGHT - 2
Label@MAP_NAME:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Button@MAP_BUTTON:
X: PARENT_RIGHT - WIDTH
Y: 284-30
Width: 174
Height: 25
Text: Choose Map
Font: Bold
Button@CREATE_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Create
Font: Bold

View File

@@ -0,0 +1,96 @@
Container@MULTIPLAYER_DIRECTCONNECT_PANEL:
Width: PARENT_RIGHT
Height: PARENT_BOTTOM
Children:
Label@TITLE:
Y: 5
Width: 583
Height: 25
Text: Connect to Server
Align: Center
Font: Bold
ScrollPanel:
Y: 30
Width: 583
Height: 249
Children:
Container:
X: 185
Y: 60
Children:
Label@ADDRESS_LABEL:
Y: 14
Width: 95
Height: 25
Align: Right
Text: Address:
TextField@IP:
X: 100
Y: 15
Width: 215
Height: 25
Label@PORT_LABEL:
Y: 49
Width: 95
Height: 25
Align: Right
Text: Port:
TextField@PORT:
X: 100
Y: 50
Width: 50
Height: 25
MaxLength: 5
Container@SIDEBAR:
X: PARENT_RIGHT-WIDTH
Y: 30
Width: 174
Height: 280
Children:
Background@MAP_BG:
Width: PARENT_RIGHT
Height: 174
Background: dialog3
Label@TITLE:
Y: 172
Width: PARENT_RIGHT
Height: 25
Font: Bold
Align: Center
Text: Direct Connect
Label@DESCA:
Y: 190
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: Enter the server IP and port in the
Label@DESCB:
Y: 203
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: fields to the left, and then press Join.
Label@DESCC:
Y: 216
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: The mod and game version will be
Label@DESCD:
Y: 229
Width: PARENT_RIGHT
Height: 25
Font: Tiny
Align: Center
Text: verified when connecting.
Button@JOIN_BUTTON:
Key: return
X: PARENT_RIGHT - WIDTH
Y: 284
Width: 174
Height: 25
Text: Join
Font: Bold

View File

@@ -8,7 +8,7 @@ Container@GLOBALCHAT_PANEL:
Height: PARENT_BOTTOM Height: PARENT_BOTTOM
Children: Children:
Background@TOPIC: Background@TOPIC:
Width: 565 Width: 582
Height: 20 Height: 20
Background: dialog2 Background: dialog2
Children: Children:
@@ -21,7 +21,7 @@ Container@GLOBALCHAT_PANEL:
Align: Center Align: Center
ScrollPanel@HISTORY_PANEL: ScrollPanel@HISTORY_PANEL:
Y: 20 Y: 20
Width: 565 Width: 582
Height: PARENT_BOTTOM - 50 Height: PARENT_BOTTOM - 50
ItemSpacing: 5 ItemSpacing: 5
Children: Children:
@@ -32,11 +32,19 @@ Container@GLOBALCHAT_PANEL:
WordWrap: True WordWrap: True
TextField@CHAT_TEXTFIELD: TextField@CHAT_TEXTFIELD:
Y: PARENT_BOTTOM - 25 Y: PARENT_BOTTOM - 25
Width: 565 Width: 582
Height: 25 Height: 25
LeftMargin: 60
Children:
Label@LABEL_CHATTYPE:
Y: 0-1
Width: 55
Height: 25
Align: Right
Text: Global:
ScrollPanel@NICKNAME_PANEL: ScrollPanel@NICKNAME_PANEL:
X: 570 X: PARENT_RIGHT-WIDTH
Width: 130 Width: 174
Height: PARENT_BOTTOM - 30 Height: PARENT_BOTTOM - 30
Children: Children:
Container@NICKNAME_TEMPLATE: Container@NICKNAME_TEMPLATE:
@@ -53,11 +61,11 @@ Container@GLOBALCHAT_PANEL:
Width: PARENT_RIGHT-15 Width: PARENT_RIGHT-15
Height: 20 Height: 20
Button@DISCONNECT_BUTTON: Button@DISCONNECT_BUTTON:
X: 570 X: PARENT_RIGHT-WIDTH
Y: PARENT_BOTTOM - 25 Y: PARENT_BOTTOM - 25
Width: 130 Width: 174
Height: 25 Height: 25
Text: Disconnect Text: Leave Chat
Font: Bold Font: Bold
Background@GLOBALCHAT_CONNECT_PANEL: Background@GLOBALCHAT_CONNECT_PANEL:
Width: PARENT_RIGHT Width: PARENT_RIGHT
@@ -84,6 +92,7 @@ Container@GLOBALCHAT_PANEL:
Y: PARENT_BOTTOM / 4 + 75 Y: PARENT_BOTTOM / 4 + 75
Height: 20 Height: 20
Width: 180 Width: 180
Font: Regular
Text: Connect Automatically Text: Connect Automatically
Button@CONNECT_BUTTON: Button@CONNECT_BUTTON:
X: 430 X: 430

View File

@@ -0,0 +1,112 @@
Background@MULTIPLAYER_PANEL:
Logic: MultiplayerLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 808
Height: 600
Children:
Label@TITLE:
Y: 15
Width: PARENT_RIGHT
Height: 25
Text: Multiplayer
Align: Center
Font: Bold
DropDownButton@FILTERS_DROPDOWNBUTTON:
X: 20
Y: 321
Width: 158
Height: 25
Text: Filter Games
Font: Bold
Button@REFRESH_BUTTON:
X: 183
Y: 321
Width: 100
Height: 25
Text: Refresh
Font: Bold
Button@BROWSER_TAB:
X: 288
Y: 315
Width: 105
Height: 31
Text: Browse
Font: Bold
Button@DIRECTCONNECT_TAB:
X: 393
Y: 315
Width: 105
Height: 31
Text: Direct IP
Font: Bold
Button@CREATE_TAB:
X: 498
Y: 315
Width: 105
Height: 31
Text: Create
Font: Bold
Container@TOP_PANELS_ROOT:
X: 20
Y: 37
Width: PARENT_RIGHT - 40
Height: PARENT_BOTTOM
Container@GLOBALCHAT_ROOT:
X: 20
Y: 351
Width: PARENT_RIGHT - 40
Height: PARENT_BOTTOM - 401
TooltipContainer@TOOLTIP_CONTAINER:
Button@BACK_BUTTON:
Key: escape
X: PARENT_RIGHT - WIDTH - 20
Y: PARENT_BOTTOM - HEIGHT - 20
Width: 120
Height: 25
Text: Back
Font: Bold
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
Width: 147
Height: 130
Children:
Checkbox@WAITING_FOR_PLAYERS:
X: 5
Y: 5
Width: 137
Height: 20
Text: Waiting
TextColor: 50,205,50
Font: Regular
Checkbox@EMPTY:
X: 5
Y: 30
Width: 137
Height: 20
Text: Empty
Font: Regular
Checkbox@PASSWORD_PROTECTED:
X: 5
Y: 55
Width: 137
Height: 20
Text: Protected
TextColor: 255,0,0
Font: Regular
Checkbox@ALREADY_STARTED:
X: 5
Y: 80
Width: 137
Height: 20
Text: Started
TextColor: 255,165,0
Font: Regular
Checkbox@INCOMPATIBLE_VERSION:
X: 5
Y: 105
Width: 137
Height: 20
Text: Incompatible
TextColor: 190,190,190
Font: Regular

View File

@@ -1,170 +0,0 @@
Background@SERVERBROWSER_PANEL:
Logic: ServerBrowserLogic
X: (WINDOW_RIGHT - WIDTH)/2
Y: (WINDOW_BOTTOM - HEIGHT)/2
Width: 740
Height: 645
Children:
Label@MULTIPLAYER_LABEL_TITLE:
X: 0
Y: 15
Width: PARENT_RIGHT
Height: 25
Text: Multiplayer
Align: Center
Font: Bold
Label@SHOW_LABEL_TITLE:
X: 20
Y: 48
Width: 20
Height: 25
Text: Show:
Font: Bold
Checkbox@WAITING_FOR_PLAYERS:
X: 80
Y: 50
Width: 100
Height: 20
Text: Waiting
TextColor: 50,205,50
Checkbox@EMPTY:
X: 180
Y: 50
Width: 100
Height: 20
Text: Empty
Checkbox@PASSWORD_PROTECTED:
X: 270
Y: 50
Width: 100
Height: 20
Text: Protected
TextColor: 255,0,0
Checkbox@ALREADY_STARTED:
X: 385
Y: 50
Width: 100
Height: 20
Text: Started
TextColor: 255,165,0
Checkbox@INCOMPATIBLE_VERSION:
X: 480
Y: 50
Width: 100
Height: 20
Text: Incompatible
TextColor: 190,190,190
ScrollPanel@SERVER_LIST:
X: 20
Y: 80
Width: 700
Height: 240
Children:
ScrollItem@HEADER_TEMPLATE:
BaseName: scrollheader
Width: PARENT_RIGHT-27
Height: 25
X: 2
Visible: false
Children:
Label@LABEL:
Y: 0-1
Font: Bold
Width: PARENT_RIGHT
Height: 25
Align: Center
ScrollItem@SERVER_TEMPLATE:
Width: PARENT_RIGHT-27
Height: 68
X: 2
Y: 0
Children:
MapPreview@MAP_PREVIEW:
X: 2
Y: 2
Width: 64
Height: 64
ShowSpawnPoints: no
Label@TITLE:
X: 70
Width: 200
Height: 25
Font: Bold
Label@MAP:
X: 70
Y: 20
Width: 250
Height: 25
Label@PLAYERS:
X: 70
Y: 40
Width: 50
Height: 25
Label@STATE:
Width: 140
X: PARENT_RIGHT-150
Align: Right
Height: 25
Font: Bold
Label@IP:
Width: 140
X: PARENT_RIGHT-150
Y: 20
Align: Right
Height: 25
Label@LOCATION:
Width: 140
X: PARENT_RIGHT-150
Y: 40
Align: Right
Height: 25
Container@GLOBALCHAT_ROOT:
X: 20
Y: 370
Width: 700
Height: 255
Label@PROGRESS_LABEL:
X: (PARENT_RIGHT - WIDTH) / 2
Y: PARENT_BOTTOM / 2 - HEIGHT
Width: 150
Height: 30
Text: Fetching games...
Align: Center
Button@REFRESH_BUTTON:
X: 20
Y: 325
Width: 100
Height: 25
Text: Refresh
Font: Bold
Button@CREATE_BUTTON:
X: PARENT_RIGHT - 120 - 120 - 120 - 120
Y: 325
Width: 100
Height: 25
Text: Create
Font: Bold
Button@DIRECTCONNECT_BUTTON:
X: PARENT_RIGHT - 120 - 120 - 120
Y: 325
Width: 100
Height: 25
Text: Direct IP
Font: Bold
Button@JOIN_BUTTON:
X: PARENT_RIGHT - 120 - 120
Y: 325
Width: 100
Height: 25
Text: Join
Font: Bold
Key: return
Button@BACK_BUTTON:
X: PARENT_RIGHT - 120
Y: 325
Width: 100
Height: 25
Text: Cancel
Font: Bold
Key: escape

View File

@@ -33,8 +33,8 @@ Metrics:
FactionSuffix-soviet: soviet FactionSuffix-soviet: soviet
FactionSuffix-russia: soviet FactionSuffix-russia: soviet
FactionSuffix-ukraine: soviet FactionSuffix-ukraine: soviet
IncompatibleVersionColor: 211,211,211
IncompatibleGameColor: 169,169,169 IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0 ProtectedGameColor: 255,0,0
IncompatibleProtectedGameColor: 178,34,34 IncompatibleProtectedGameColor: 178,34,34
WaitingGameColor: 0,255,0 WaitingGameColor: 0,255,0

View File

@@ -104,10 +104,12 @@ ChromeLayout:
./mods/ra/chrome/lobby-globalchat.yaml ./mods/ra/chrome/lobby-globalchat.yaml
./mods/ra/chrome/color-picker.yaml ./mods/ra/chrome/color-picker.yaml
./mods/ra/chrome/map-chooser.yaml ./mods/ra/chrome/map-chooser.yaml
./mods/ra/chrome/create-server.yaml ./mods/ra/chrome/multiplayer.yaml
./mods/ra/chrome/serverbrowser.yaml ./mods/ra/chrome/multiplayer-browser.yaml
./mods/ra/chrome/multiplayer-createserver.yaml
./mods/ra/chrome/multiplayer-directconnect.yaml
./mods/ra/chrome/multiplayer-globalchat.yaml
./mods/ra/chrome/connection.yaml ./mods/ra/chrome/connection.yaml
./mods/ra/chrome/directconnect.yaml
./mods/ra/chrome/replaybrowser.yaml ./mods/ra/chrome/replaybrowser.yaml
./mods/ra/chrome/dropdowns.yaml ./mods/ra/chrome/dropdowns.yaml
./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/musicplayer.yaml
@@ -116,7 +118,6 @@ ChromeLayout:
./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml ./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml ./mods/ra/chrome/editor.yaml
./mods/ra/chrome/globalchat.yaml
Weapons: Weapons:
./mods/ra/weapons/explosions.yaml ./mods/ra/weapons/explosions.yaml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1000 B

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -274,6 +274,8 @@ lobby-bits: spawnpoints.png
admin: 64,5,7,5 admin: 64,5,7,5
colorpicker: 5,5,22,22 colorpicker: 5,5,22,22
huepicker: 71,0,7,15 huepicker: 71,0,7,15
protected: 79,0,10,13
protected-disabled: 90,0,10,13
strategic: strategic.png strategic: strategic.png
unowned: 0,0,32,32 unowned: 0,0,32,32

View File

@@ -26,8 +26,8 @@ Metrics:
SpawnColor: 255,255,255 SpawnColor: 255,255,255
SpawnContrastColor: 0,0,0 SpawnContrastColor: 0,0,0
SpawnLabelOffset: 0,1 SpawnLabelOffset: 0,1
IncompatibleVersionColor: 255,0,0
IncompatibleGameColor: 169,169,169 IncompatibleGameColor: 169,169,169
CantJoinGameColor: 211,211,211
ProtectedGameColor: 255,0,0 ProtectedGameColor: 255,0,0
IncompatibleProtectedGameColor: 139,0,0 IncompatibleProtectedGameColor: 139,0,0
WaitingGameColor: 0,255,0 WaitingGameColor: 0,255,0

View File

@@ -158,10 +158,12 @@ ChromeLayout:
./mods/ra/chrome/lobby-globalchat.yaml ./mods/ra/chrome/lobby-globalchat.yaml
./mods/ts/chrome/color-picker.yaml ./mods/ts/chrome/color-picker.yaml
./mods/ra/chrome/map-chooser.yaml ./mods/ra/chrome/map-chooser.yaml
./mods/ra/chrome/create-server.yaml ./mods/ra/chrome/multiplayer.yaml
./mods/ra/chrome/serverbrowser.yaml ./mods/ra/chrome/multiplayer-browser.yaml
./mods/ra/chrome/multiplayer-createserver.yaml
./mods/ra/chrome/multiplayer-directconnect.yaml
./mods/ra/chrome/multiplayer-globalchat.yaml
./mods/ra/chrome/connection.yaml ./mods/ra/chrome/connection.yaml
./mods/ra/chrome/directconnect.yaml
./mods/ra/chrome/replaybrowser.yaml ./mods/ra/chrome/replaybrowser.yaml
./mods/ts/chrome/dropdowns.yaml ./mods/ts/chrome/dropdowns.yaml
./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/musicplayer.yaml
@@ -170,7 +172,6 @@ ChromeLayout:
./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/missionbrowser.yaml
./mods/ra/chrome/confirmation-dialogs.yaml ./mods/ra/chrome/confirmation-dialogs.yaml
./mods/ra/chrome/editor.yaml ./mods/ra/chrome/editor.yaml
./mods/ra/chrome/globalchat.yaml
Voices: Voices:
./mods/ts/audio/voices.yaml ./mods/ts/audio/voices.yaml