Merge pull request #9744 from pchote/serverbrowser
Redesign the MP server browser.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA
|
||||
{
|
||||
public sealed class MapCache : IEnumerable<MapPreview>, IDisposable
|
||||
{
|
||||
public static readonly MapPreview UnknownMap = new MapPreview(null, null);
|
||||
public static readonly MapPreview UnknownMap = new MapPreview(null, TileShape.Rectangle, null);
|
||||
readonly Cache<string, MapPreview> previews;
|
||||
readonly ModData modData;
|
||||
readonly SheetBuilder sheetBuilder;
|
||||
@@ -35,7 +35,9 @@ namespace OpenRA
|
||||
public MapCache(ModData modData)
|
||||
{
|
||||
this.modData = modData;
|
||||
previews = new Cache<string, MapPreview>(uid => new MapPreview(uid, this));
|
||||
|
||||
var gridType = Exts.Lazy(() => modData.Manifest.Get<MapGrid>().Type);
|
||||
previews = new Cache<string, MapPreview>(uid => new MapPreview(uid, gridType.Value, this));
|
||||
sheetBuilder = new SheetBuilder(SheetType.BGRA);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace OpenRA
|
||||
public readonly int players;
|
||||
public readonly Rectangle bounds;
|
||||
public readonly int[] spawnpoints = { };
|
||||
public readonly TileShape map_grid_type;
|
||||
public readonly string minimap;
|
||||
public readonly bool downloading;
|
||||
}
|
||||
@@ -62,6 +63,7 @@ namespace OpenRA
|
||||
public string Author { get; private set; }
|
||||
public int PlayerCount { get; private set; }
|
||||
public CPos[] SpawnPoints { get; private set; }
|
||||
public TileShape GridType { get; private set; }
|
||||
public Rectangle Bounds { get; private set; }
|
||||
public Bitmap CustomPreview { get; private set; }
|
||||
public Map Map { get; private set; }
|
||||
@@ -97,7 +99,7 @@ namespace OpenRA
|
||||
generatingMinimap = false;
|
||||
}
|
||||
|
||||
public MapPreview(string uid, MapCache cache)
|
||||
public MapPreview(string uid, TileShape gridType, MapCache cache)
|
||||
{
|
||||
this.cache = cache;
|
||||
Uid = uid;
|
||||
@@ -107,6 +109,7 @@ namespace OpenRA
|
||||
PlayerCount = 0;
|
||||
Bounds = Rectangle.Empty;
|
||||
SpawnPoints = NoSpawns;
|
||||
GridType = gridType;
|
||||
Status = MapStatus.Unavailable;
|
||||
Class = MapClassification.Unknown;
|
||||
}
|
||||
@@ -120,6 +123,7 @@ namespace OpenRA
|
||||
Author = m.Author;
|
||||
Bounds = m.Bounds;
|
||||
SpawnPoints = m.SpawnPoints.Value;
|
||||
GridType = m.Grid.Type;
|
||||
CustomPreview = m.CustomPreview;
|
||||
Status = MapStatus.Available;
|
||||
Class = classification;
|
||||
@@ -179,6 +183,7 @@ namespace OpenRA
|
||||
for (var j = 0; j < r.spawnpoints.Length; j += 2)
|
||||
spawns[j / 2] = new CPos(r.spawnpoints[j], r.spawnpoints[j + 1]);
|
||||
SpawnPoints = spawns;
|
||||
GridType = r.map_grid_type;
|
||||
|
||||
CustomPreview = new Bitmap(new MemoryStream(Convert.FromBase64String(r.minimap)));
|
||||
}
|
||||
|
||||
@@ -566,7 +566,6 @@
|
||||
<Compile Include="Widgets\Logic\ConnectionLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\FactionTooltipLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\CreditsLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\DirectConnectLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\DisconnectWatcherLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Ingame\AddFactionSuffixLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\Ingame\ClassicProductionLogic.cs" />
|
||||
@@ -620,7 +619,6 @@
|
||||
<Compile Include="Widgets\Logic\MusicPlayerLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\PerfDebugLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ReplayBrowserLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ServerBrowserLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\ServerCreationLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\SettingsLogic.cs" />
|
||||
<Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" />
|
||||
@@ -706,6 +704,7 @@
|
||||
<Compile Include="Widgets\Logic\GlobalChatLogic.cs" />
|
||||
<Compile Include="Lint\CheckChromeLogic.cs" />
|
||||
<Compile Include="Lint\CheckMapMetadata.cs" />
|
||||
<Compile Include="Widgets\Logic\MultiplayerLogic.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -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(); };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
var spawnSize = new float2(ChromeProvider.GetImage("lobby-bits", "spawn-unclaimed").Bounds.Size);
|
||||
var selectedSpawn = preview.SpawnPoints
|
||||
.Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(sp), i))
|
||||
.Select((sp, i) => Pair.New(mapPreview.ConvertToPreview(sp, preview.GridType), i))
|
||||
.Where(a => ((a.First - mi.Location).ToFloat2() / spawnSize * 2).LengthSquared <= 1)
|
||||
.Select(a => a.Second + 1)
|
||||
.FirstOrDefault();
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
mainMenu.Get<ButtonWidget>("MULTIPLAYER_BUTTON").OnClick = () =>
|
||||
{
|
||||
menuType = MenuType.None;
|
||||
Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs
|
||||
Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onStart", RemoveShellmapUI },
|
||||
{ "onExit", () => menuType = MenuType.Main },
|
||||
@@ -220,7 +220,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Game.OnRemoteDirectConnect += (host, port) =>
|
||||
{
|
||||
menuType = MenuType.None;
|
||||
Ui.OpenWindow("SERVERBROWSER_PANEL", new WidgetArgs
|
||||
Ui.OpenWindow("MULTIPLAYER_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "onStart", RemoveShellmapUI },
|
||||
{ "onExit", () => menuType = MenuType.Main },
|
||||
|
||||
@@ -20,10 +20,14 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
public class ServerBrowserLogic : ChromeLogic
|
||||
public class MultiplayerLogic : ChromeLogic
|
||||
{
|
||||
static readonly Action DoNothing = () => { };
|
||||
|
||||
enum PanelType { Browser, DirectConnect, CreateServer }
|
||||
PanelType panel = PanelType.Browser;
|
||||
|
||||
readonly Color incompatibleVersionColor;
|
||||
readonly Color incompatibleProtectedGameColor;
|
||||
readonly Color protectedGameColor;
|
||||
readonly Color incompatibleWaitingGameColor;
|
||||
@@ -31,18 +35,20 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
readonly Color incompatibleGameStartedColor;
|
||||
readonly Color gameStartedColor;
|
||||
readonly Color incompatibleGameColor;
|
||||
readonly Color cantJoinGameColor;
|
||||
|
||||
GameServer currentServer;
|
||||
MapPreview currentMap;
|
||||
|
||||
ScrollItemWidget serverTemplate;
|
||||
ScrollItemWidget headerTemplate;
|
||||
|
||||
Action onStart;
|
||||
Action onExit;
|
||||
|
||||
enum SearchStatus { Fetching, Failed, NoGames, Hidden }
|
||||
SearchStatus searchStatus = SearchStatus.Fetching;
|
||||
Download currentQuery;
|
||||
Widget panel, serverList;
|
||||
Widget serverList;
|
||||
|
||||
bool showWaiting = true;
|
||||
bool showEmpty = true;
|
||||
@@ -55,87 +61,52 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
switch (searchStatus)
|
||||
{
|
||||
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 "";
|
||||
}
|
||||
}
|
||||
|
||||
[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.onExit = onExit;
|
||||
|
||||
incompatibleVersionColor = ChromeMetrics.Get<Color>("IncompatibleVersionColor");
|
||||
incompatibleGameColor = ChromeMetrics.Get<Color>("IncompatibleGameColor");
|
||||
cantJoinGameColor = ChromeMetrics.Get<Color>("CantJoinGameColor");
|
||||
protectedGameColor = ChromeMetrics.Get<Color>("ProtectedGameColor");
|
||||
incompatibleProtectedGameColor = ChromeMetrics.Get<Color>("IncompatibleProtectedGameColor");
|
||||
protectedGameColor = ChromeMetrics.Get<Color>("ProtectedGameColor");
|
||||
waitingGameColor = ChromeMetrics.Get<Color>("WaitingGameColor");
|
||||
incompatibleWaitingGameColor = ChromeMetrics.Get<Color>("IncompatibleWaitingGameColor");
|
||||
gameStartedColor = ChromeMetrics.Get<Color>("GameStartedColor");
|
||||
incompatibleGameStartedColor = ChromeMetrics.Get<Color>("IncompatibleGameStartedColor");
|
||||
|
||||
serverList = panel.Get<ScrollPanelWidget>("SERVER_LIST");
|
||||
headerTemplate = serverList.Get<ScrollItemWidget>("HEADER_TEMPLATE");
|
||||
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
|
||||
LoadBrowserPanel(widget);
|
||||
LoadDirectConnectPanel(widget);
|
||||
LoadCreateServerPanel(widget);
|
||||
|
||||
// Menu buttons
|
||||
var refreshButton = panel.Get<ButtonWidget>("REFRESH_BUTTON");
|
||||
refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching;
|
||||
refreshButton.GetText = () => searchStatus == SearchStatus.Fetching ? "Refreshing..." : "Refresh";
|
||||
refreshButton.OnClick = RefreshServerList;
|
||||
// Filter and refresh buttons act on the browser panel,
|
||||
// but remain visible (disabled) on the other panels
|
||||
var refreshButton = widget.Get<ButtonWidget>("REFRESH_BUTTON");
|
||||
refreshButton.IsDisabled = () => searchStatus == SearchStatus.Fetching || panel != PanelType.Browser;
|
||||
|
||||
panel.Get<ButtonWidget>("DIRECTCONNECT_BUTTON").OnClick = OpenDirectConnectPanel;
|
||||
panel.Get<ButtonWidget>("CREATE_BUTTON").OnClick = OpenCreateServerPanel;
|
||||
var filtersButton = widget.GetOrNull<DropDownButtonWidget>("FILTERS_DROPDOWNBUTTON");
|
||||
filtersButton.IsDisabled = () => searchStatus == SearchStatus.Fetching || panel != PanelType.Browser;
|
||||
|
||||
var join = panel.Get<ButtonWidget>("JOIN_BUTTON");
|
||||
join.IsDisabled = () => currentServer == null || !currentServer.IsJoinable;
|
||||
join.OnClick = () => Join(currentServer);
|
||||
var browserTab = widget.Get<ButtonWidget>("BROWSER_TAB");
|
||||
browserTab.IsHighlighted = () => panel == PanelType.Browser;
|
||||
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
|
||||
// The text is only visible when the list is empty
|
||||
var progressText = panel.Get<LabelWidget>("PROGRESS_LABEL");
|
||||
progressText.IsVisible = () => searchStatus != SearchStatus.Hidden;
|
||||
progressText.GetText = ProgressLabelText;
|
||||
var createServerTab = widget.Get<ButtonWidget>("CREATE_TAB");
|
||||
createServerTab.IsHighlighted = () => panel == PanelType.CreateServer;
|
||||
createServerTab.OnClick = () => panel = PanelType.CreateServer;
|
||||
|
||||
var showWaitingCheckbox = panel.GetOrNull<CheckboxWidget>("WAITING_FOR_PLAYERS");
|
||||
if (showWaitingCheckbox != null)
|
||||
{
|
||||
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());
|
||||
widget.Get<ButtonWidget>("BACK_BUTTON").OnClick = () => { Ui.CloseWindow(); onExit(); };
|
||||
Game.LoadWidget(null, "GLOBALCHAT_PANEL", widget.Get("GLOBALCHAT_ROOT"), new WidgetArgs());
|
||||
|
||||
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()
|
||||
{
|
||||
// Query in progress
|
||||
@@ -196,6 +319,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
return 1;
|
||||
}
|
||||
|
||||
void SelectServer(GameServer server)
|
||||
{
|
||||
currentServer = server;
|
||||
currentMap = server != null ? Game.ModData.MapCache[server.Map] : null;
|
||||
}
|
||||
|
||||
void RefreshServerListInner(IEnumerable<GameServer> games)
|
||||
{
|
||||
if (games == null)
|
||||
@@ -205,6 +334,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
.OrderByDescending(g => GroupSortOrder(g.First()))
|
||||
.ThenByDescending(g => g.Count());
|
||||
|
||||
ScrollItemWidget nextServerRow = null;
|
||||
var rows = new List<Widget>();
|
||||
foreach (var modGames in mods)
|
||||
{
|
||||
@@ -224,49 +354,39 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
continue;
|
||||
|
||||
var canJoin = game.IsJoinable;
|
||||
var compatible = game.IsCompatible;
|
||||
|
||||
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 item = ScrollItemWidget.Setup(serverTemplate, () => currentServer == game, () => SelectServer(game), () => Join(game));
|
||||
var title = item.GetOrNull<LabelWidget>("TITLE");
|
||||
if (title != null)
|
||||
{
|
||||
title.GetText = () => game.Name;
|
||||
title.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : title.TextColor;
|
||||
title.GetColor = () => canJoin ? title.TextColor : incompatibleGameColor;
|
||||
}
|
||||
|
||||
var maptitle = item.GetOrNull<LabelWidget>("MAP");
|
||||
if (maptitle != null)
|
||||
var password = item.GetOrNull<ImageWidget>("PASSWORD_PROTECTED");
|
||||
if (password != null)
|
||||
{
|
||||
maptitle.GetText = () => map.Title;
|
||||
maptitle.GetColor = () => !compatible ? Color.DarkGray : !canJoin ? Color.LightGray : maptitle.TextColor;
|
||||
password.IsVisible = () => game.Protected;
|
||||
password.GetImageName = () => canJoin ? "protected" : "protected-disabled";
|
||||
}
|
||||
|
||||
var players = item.GetOrNull<LabelWidget>("PLAYERS");
|
||||
if (players != null)
|
||||
{
|
||||
players.GetText = () => "{0} / {1}".F(game.Players, game.MaxPlayers)
|
||||
+ (game.Spectators > 0 ? " ({0} Spectator{1})".F(game.Spectators, game.Spectators > 1 ? "s" : "") : "");
|
||||
players.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : players.TextColor;
|
||||
+ (game.Spectators > 0 ? " + {0}".F(game.Spectators) : "");
|
||||
|
||||
players.GetColor = () => canJoin ? players.TextColor : incompatibleGameColor;
|
||||
}
|
||||
|
||||
var state = item.GetOrNull<LabelWidget>("STATE");
|
||||
var state = item.GetOrNull<LabelWidget>("STATUS");
|
||||
if (state != null)
|
||||
{
|
||||
state.GetText = () => GetStateLabel(game);
|
||||
state.GetColor = () => GetStateColor(game, state, !compatible || !canJoin);
|
||||
}
|
||||
var label = game.State >= (int)ServerState.GameStarted ?
|
||||
"Playing" : "Waiting";
|
||||
state.GetText = () => label;
|
||||
|
||||
var ip = item.GetOrNull<LabelWidget>("IP");
|
||||
if (ip != null)
|
||||
{
|
||||
ip.GetText = () => game.Address;
|
||||
ip.GetColor = () => !compatible ? incompatibleGameColor : !canJoin ? cantJoinGameColor : ip.TextColor;
|
||||
var color = GetStateColor(game, state, !canJoin);
|
||||
state.GetColor = () => color;
|
||||
}
|
||||
|
||||
var location = item.GetOrNull<LabelWidget>("LOCATION");
|
||||
@@ -274,9 +394,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
var cachedServerLocation = GeoIP.LookupCountry(game.Address.Split(':')[0]);
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -284,7 +407,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Game.RunAfterTick(() =>
|
||||
{
|
||||
serverList.RemoveChildren();
|
||||
currentServer = null;
|
||||
SelectServer(null);
|
||||
|
||||
if (games == null)
|
||||
{
|
||||
@@ -292,13 +415,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
return;
|
||||
}
|
||||
|
||||
if (!games.Any())
|
||||
if (!rows.Any())
|
||||
{
|
||||
searchStatus = SearchStatus.NoGames;
|
||||
return;
|
||||
}
|
||||
|
||||
currentServer = games.FirstOrDefault();
|
||||
searchStatus = SearchStatus.Hidden;
|
||||
|
||||
// Search for any unknown maps
|
||||
@@ -307,28 +429,39 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
foreach (var row in rows)
|
||||
serverList.AddChild(row);
|
||||
|
||||
if (nextServerRow != null)
|
||||
nextServerRow.OnClick();
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
{ "onExit", Game.Disconnect },
|
||||
{ "onStart", onStart },
|
||||
{ "onExit", onLobbyExit },
|
||||
{ "skirmishMode", false }
|
||||
});
|
||||
}
|
||||
|
||||
void OpenDirectConnectPanel()
|
||||
{
|
||||
Ui.OpenWindow("DIRECTCONNECT_PANEL", new WidgetArgs
|
||||
{
|
||||
{ "openLobby", OpenLobby },
|
||||
{ "onExit", DoNothing }
|
||||
});
|
||||
}
|
||||
|
||||
void OpenCreateServerPanel()
|
||||
{
|
||||
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" : "");
|
||||
}
|
||||
|
||||
return game.Protected ? label + " (Password protected)" : label;
|
||||
return label;
|
||||
}
|
||||
|
||||
if (game.State == (int)ServerState.WaitingPlayers)
|
||||
{
|
||||
var label = "Waiting for players";
|
||||
return game.Protected ? label + " (Password protected)" : label;
|
||||
}
|
||||
return game.Protected ? "Password protected" : "Waiting for players";
|
||||
|
||||
if (game.State == (int)ServerState.ShuttingDown)
|
||||
return "Server shutting down";
|
||||
@@ -380,14 +510,14 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
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)
|
||||
return darkened ? incompatibleProtectedGameColor : protectedGameColor;
|
||||
|
||||
if (game.State == (int)ServerState.WaitingPlayers)
|
||||
return darkened ? incompatibleWaitingGameColor : waitingGameColor;
|
||||
|
||||
if (game.State == (int)ServerState.GameStarted)
|
||||
return darkened ? incompatibleGameStartedColor : gameStartedColor;
|
||||
|
||||
@@ -396,13 +526,13 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
bool Filtered(GameServer game)
|
||||
{
|
||||
if ((game.State == (int)ServerState.GameStarted) && !showStarted)
|
||||
if (game.State == (int)ServerState.GameStarted && !showStarted)
|
||||
return true;
|
||||
|
||||
if ((game.State == (int)ServerState.WaitingPlayers) && !showWaiting && game.Players != 0)
|
||||
if (game.State == (int)ServerState.WaitingPlayers && !showWaiting && game.Players != 0)
|
||||
return true;
|
||||
|
||||
if ((game.Players == 0) && !showEmpty)
|
||||
if (game.Players == 0 && !showEmpty)
|
||||
return true;
|
||||
|
||||
if (!game.IsCompatible && !showIncompatible)
|
||||
@@ -33,7 +33,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var settings = Game.Settings;
|
||||
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;
|
||||
|
||||
var mapButton = panel.GetOrNull<ButtonWidget>("MAP_BUTTON");
|
||||
@@ -132,7 +131,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
return;
|
||||
}
|
||||
|
||||
Ui.CloseWindow();
|
||||
ConnectionLogic.Connect(IPAddress.Loopback.ToString(), Game.Settings.Server.ListenPort, password, onCreate, onExit);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
readonly SpriteFont spawnFont;
|
||||
readonly Color spawnColor, spawnContrastColor;
|
||||
readonly int2 spawnLabelOffset;
|
||||
readonly int cellWidth;
|
||||
readonly TileShape shape;
|
||||
|
||||
public Func<MapPreview> Preview = () => null;
|
||||
public Func<Dictionary<CPos, SpawnOccupant>> SpawnOccupants = () => new Dictionary<CPos, SpawnOccupant>();
|
||||
@@ -83,9 +81,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
spawnColor = ChromeMetrics.Get<Color>("SpawnColor");
|
||||
spawnContrastColor = ChromeMetrics.Get<Color>("SpawnContrastColor");
|
||||
spawnLabelOffset = ChromeMetrics.Get<int2>("SpawnLabelOffset");
|
||||
|
||||
shape = Game.ModData.Manifest.Get<MapGrid>().Type;
|
||||
cellWidth = shape == TileShape.Diamond ? 2 : 1;
|
||||
}
|
||||
|
||||
protected MapPreviewWidget(MapPreviewWidget other)
|
||||
@@ -107,9 +102,6 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
spawnColor = ChromeMetrics.Get<Color>("SpawnColor");
|
||||
spawnContrastColor = ChromeMetrics.Get<Color>("SpawnContrastColor");
|
||||
spawnLabelOffset = ChromeMetrics.Get<int2>("SpawnLabelOffset");
|
||||
|
||||
shape = other.shape;
|
||||
cellWidth = other.cellWidth;
|
||||
}
|
||||
|
||||
public override Widget Clone() { return new MapPreviewWidget(this); }
|
||||
@@ -138,10 +130,11 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
tooltipContainer.Value.RemoveTooltip();
|
||||
}
|
||||
|
||||
public int2 ConvertToPreview(CPos cell)
|
||||
public int2 ConvertToPreview(CPos cell, TileShape gridType)
|
||||
{
|
||||
var preview = Preview();
|
||||
var point = cell.ToMPos(shape);
|
||||
var point = cell.ToMPos(gridType);
|
||||
var cellWidth = gridType == TileShape.Diamond ? 2 : 1;
|
||||
var dx = (int)(previewScale * cellWidth * (point.U - preview.Bounds.Left));
|
||||
var dy = (int)(previewScale * (point.V - preview.Bounds.Top));
|
||||
|
||||
@@ -180,10 +173,11 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
var colors = SpawnOccupants().ToDictionary(c => c.Key, c => c.Value.Color.RGB);
|
||||
|
||||
var spawnPoints = preview.SpawnPoints;
|
||||
var gridType = preview.GridType;
|
||||
foreach (var p in spawnPoints)
|
||||
{
|
||||
var owned = colors.ContainsKey(p);
|
||||
var pos = ConvertToPreview(p);
|
||||
var pos = ConvertToPreview(p, gridType);
|
||||
var sprite = owned ? spawnClaimed : spawnUnclaimed;
|
||||
var offset = new int2(sprite.Bounds.Width, sprite.Bounds.Height) / 2;
|
||||
|
||||
|
||||
@@ -449,6 +449,8 @@ lobby-bits: chrome.png
|
||||
colorpicker: 257,33,14,14
|
||||
huepicker: 388,96,7,15
|
||||
kick: 386,115,11,11
|
||||
protected: 403,97,10,13
|
||||
protected-disabled: 403,113,10,13
|
||||
|
||||
checkbox-bits: chrome.png
|
||||
checked: 272,32,16,16
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,8 +20,8 @@ Container@LOBBY_GLOBALCHAT_PANEL:
|
||||
Font: TinyBold
|
||||
Align: Center
|
||||
ScrollPanel@HISTORY_PANEL:
|
||||
Width: 582
|
||||
Y: 19
|
||||
Width: 582
|
||||
Height: PARENT_BOTTOM - 19
|
||||
ItemSpacing: 5
|
||||
Children:
|
||||
|
||||
@@ -7,14 +7,14 @@ Container@SERVER_LOBBY:
|
||||
Children:
|
||||
ColorPreviewManager@COLOR_MANAGER:
|
||||
Label@SERVER_NAME:
|
||||
Width: 800
|
||||
Width: PARENT_RIGHT
|
||||
Y: 0-25
|
||||
Font: BigBold
|
||||
Contrast: true
|
||||
Align: Center
|
||||
Background@bg:
|
||||
Width: 800
|
||||
Height: 540
|
||||
Width: PARENT_RIGHT
|
||||
Height: PARENT_BOTTOM - 35
|
||||
Background: panel-black
|
||||
Children:
|
||||
Container@MAP_PREVIEW_ROOT:
|
||||
@@ -122,13 +122,13 @@ Container@SERVER_LOBBY:
|
||||
Width: PARENT_RIGHT - 30
|
||||
Height: PARENT_BOTTOM - 330
|
||||
Button@DISCONNECT_BUTTON:
|
||||
Y: 539
|
||||
Y: PARENT_BOTTOM - 36
|
||||
Width: 140
|
||||
Height: 35
|
||||
Text: Leave Game
|
||||
Button@START_GAME_BUTTON:
|
||||
X: PARENT_RIGHT - WIDTH
|
||||
Y: 539
|
||||
Y: PARENT_BOTTOM - 36
|
||||
Width: 140
|
||||
Height: 35
|
||||
Text: Start Game
|
||||
|
||||
@@ -59,7 +59,7 @@ Container@MAPCHOOSER_PANEL:
|
||||
X: 15
|
||||
Y: 45
|
||||
Width: PARENT_RIGHT - 30
|
||||
Height: 440
|
||||
Height: PARENT_BOTTOM - 60
|
||||
Children:
|
||||
ScrollPanel@MAP_LIST:
|
||||
Width: PARENT_RIGHT
|
||||
@@ -69,7 +69,7 @@ Container@MAPCHOOSER_PANEL:
|
||||
X: 15
|
||||
Y: 45
|
||||
Width: PARENT_RIGHT - 30
|
||||
Height: 440
|
||||
Height: PARENT_BOTTOM - 60
|
||||
Children:
|
||||
ScrollPanel@MAP_LIST:
|
||||
Width: PARENT_RIGHT
|
||||
@@ -79,7 +79,6 @@ Container@MAPCHOOSER_PANEL:
|
||||
Width: 183
|
||||
Height: 232
|
||||
X: 2
|
||||
Y: 0
|
||||
Visible: false
|
||||
Children:
|
||||
MapPreview@PREVIEW:
|
||||
|
||||
140
mods/cnc/chrome/multiplayer-browser.yaml
Normal file
140
mods/cnc/chrome/multiplayer-browser.yaml
Normal 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
|
||||
129
mods/cnc/chrome/multiplayer-createserver.yaml
Normal file
129
mods/cnc/chrome/multiplayer-createserver.yaml
Normal 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
|
||||
95
mods/cnc/chrome/multiplayer-directconnect.yaml
Normal file
95
mods/cnc/chrome/multiplayer-directconnect.yaml
Normal 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
|
||||
@@ -8,7 +8,7 @@ Container@GLOBALCHAT_PANEL:
|
||||
Height: PARENT_BOTTOM
|
||||
Children:
|
||||
Background@TOPIC:
|
||||
Width: 565
|
||||
Width: 582
|
||||
Height: 20
|
||||
Background: panel-transparent
|
||||
Children:
|
||||
@@ -20,8 +20,8 @@ Container@GLOBALCHAT_PANEL:
|
||||
Font: TinyBold
|
||||
Align: Center
|
||||
ScrollPanel@HISTORY_PANEL:
|
||||
Width: 565
|
||||
Y: 19
|
||||
Width: 582
|
||||
Height: PARENT_BOTTOM - 49
|
||||
ItemSpacing: 5
|
||||
Children:
|
||||
@@ -32,11 +32,19 @@ Container@GLOBALCHAT_PANEL:
|
||||
WordWrap: True
|
||||
TextField@CHAT_TEXTFIELD:
|
||||
Y: PARENT_BOTTOM - 25
|
||||
Width: 565
|
||||
Width: 582
|
||||
Height: 25
|
||||
LeftMargin: 60
|
||||
Children:
|
||||
Label@LABEL_CHATTYPE:
|
||||
Y: 0-1
|
||||
Width: 55
|
||||
Height: 25
|
||||
Align: Right
|
||||
Text: Global:
|
||||
ScrollPanel@NICKNAME_PANEL:
|
||||
X: 570
|
||||
Width: 130
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Width: 174
|
||||
Height: PARENT_BOTTOM - 30
|
||||
Children:
|
||||
Container@NICKNAME_TEMPLATE:
|
||||
@@ -53,11 +61,11 @@ Container@GLOBALCHAT_PANEL:
|
||||
Width: PARENT_RIGHT-15
|
||||
Height: 20
|
||||
Button@DISCONNECT_BUTTON:
|
||||
X: 570
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Y: PARENT_BOTTOM - 25
|
||||
Width: 130
|
||||
Width: 174
|
||||
Height: 25
|
||||
Text: Disconnect
|
||||
Text: Leave Chat
|
||||
Font: Bold
|
||||
Background@GLOBALCHAT_CONNECT_PANEL:
|
||||
Width: PARENT_RIGHT
|
||||
111
mods/cnc/chrome/multiplayer.yaml
Normal file
111
mods/cnc/chrome/multiplayer.yaml
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -26,8 +26,8 @@ Metrics:
|
||||
SpawnColor: 255,255,255
|
||||
SpawnContrastColor: 0,0,0
|
||||
SpawnLabelOffset: 0,1
|
||||
IncompatibleVersionColor: 255,0,0
|
||||
IncompatibleGameColor: 169,169,169
|
||||
CantJoinGameColor: 211,211,211
|
||||
ProtectedGameColor: 255,0,0
|
||||
IncompatibleProtectedGameColor: 139,0,0
|
||||
WaitingGameColor: 0,255,0
|
||||
|
||||
@@ -91,9 +91,11 @@ Assemblies:
|
||||
|
||||
ChromeLayout:
|
||||
./mods/cnc/chrome/mainmenu.yaml
|
||||
./mods/cnc/chrome/serverbrowser.yaml
|
||||
./mods/cnc/chrome/createserver.yaml
|
||||
./mods/cnc/chrome/directconnect.yaml
|
||||
./mods/cnc/chrome/multiplayer.yaml
|
||||
./mods/cnc/chrome/multiplayer-browser.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-mappreview.yaml
|
||||
./mods/cnc/chrome/lobby-players.yaml
|
||||
@@ -123,7 +125,6 @@ ChromeLayout:
|
||||
./mods/cnc/chrome/assetbrowser.yaml
|
||||
./mods/cnc/chrome/missionbrowser.yaml
|
||||
./mods/cnc/chrome/editor.yaml
|
||||
./mods/cnc/chrome/globalchat.yaml
|
||||
|
||||
Voices:
|
||||
./mods/cnc/audio/voices.yaml
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 79 KiB |
@@ -155,6 +155,8 @@ lobby-bits: spawnpoints.png
|
||||
admin: 64,5,7,5
|
||||
colorpicker: 5,5,22,22
|
||||
huepicker: 71,0,7,15
|
||||
protected: 79,0,10,13
|
||||
protected-disabled: 90,0,10,13
|
||||
|
||||
strategic: strategic.png
|
||||
unowned: 0,0,32,32
|
||||
|
||||
@@ -26,8 +26,8 @@ Metrics:
|
||||
SpawnColor: 255,255,255
|
||||
SpawnContrastColor: 0,0,0
|
||||
SpawnLabelOffset: 0,1
|
||||
IncompatibleVersionColor: 255,0,0
|
||||
IncompatibleGameColor: 169,169,169
|
||||
CantJoinGameColor: 211,211,211
|
||||
ProtectedGameColor: 255,0,0
|
||||
IncompatibleProtectedGameColor: 139,0,0
|
||||
WaitingGameColor: 0,255,0
|
||||
|
||||
@@ -93,11 +93,12 @@ ChromeLayout:
|
||||
./mods/ra/chrome/lobby-globalchat.yaml
|
||||
./mods/d2k/chrome/color-picker.yaml
|
||||
./mods/ra/chrome/map-chooser.yaml
|
||||
./mods/ra/chrome/create-server.yaml
|
||||
./mods/ra/chrome/serverbrowser.yaml
|
||||
./mods/ra/chrome/multiplayer.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/directconnect.yaml
|
||||
./mods/ra/chrome/replaybrowser.yaml
|
||||
./mods/d2k/chrome/dropdowns.yaml
|
||||
./mods/ra/chrome/musicplayer.yaml
|
||||
./mods/d2k/chrome/tooltips.yaml
|
||||
@@ -105,7 +106,6 @@ ChromeLayout:
|
||||
./mods/d2k/chrome/missionbrowser.yaml
|
||||
./mods/ra/chrome/confirmation-dialogs.yaml
|
||||
./mods/ra/chrome/editor.yaml
|
||||
./mods/ra/chrome/globalchat.yaml
|
||||
|
||||
Weapons:
|
||||
./mods/d2k/weapons.yaml
|
||||
|
||||
@@ -461,6 +461,8 @@ lobby-bits: spawnpoints.png
|
||||
admin: 64,5,7,5
|
||||
colorpicker: 5,5,22,22
|
||||
huepicker: 71,0,7,15
|
||||
protected: 79,0,10,13
|
||||
protected-disabled: 90,0,10,13
|
||||
|
||||
strategic: strategic.png
|
||||
unowned: 0,0,32,32
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -49,8 +49,8 @@ Container@LOBBY_GLOBALCHAT_PANEL:
|
||||
Height: PARENT_BOTTOM - 30
|
||||
Children:
|
||||
Container@NICKNAME_TEMPLATE:
|
||||
Height: 20
|
||||
Width: PARENT_RIGHT-25
|
||||
Height: 20
|
||||
Children:
|
||||
Image@INDICATOR:
|
||||
ImageCollection: lobby-bits
|
||||
|
||||
@@ -7,11 +7,10 @@ Background@SERVER_LOBBY:
|
||||
Children:
|
||||
ColorPreviewManager@COLOR_MANAGER:
|
||||
Label@SERVER_NAME:
|
||||
X: 0
|
||||
Y: 15
|
||||
Align: Center
|
||||
Width: PARENT_RIGHT
|
||||
Height: 20
|
||||
Height: 25
|
||||
Font: Bold
|
||||
Container@MAP_PREVIEW_ROOT:
|
||||
X: PARENT_RIGHT-20-WIDTH
|
||||
@@ -85,9 +84,9 @@ Background@SERVER_LOBBY:
|
||||
ItemSpacing: 2
|
||||
Children:
|
||||
Container@CHAT_TEMPLATE:
|
||||
X: 2
|
||||
Width: PARENT_RIGHT-27
|
||||
Height: 16
|
||||
X: 2
|
||||
Children:
|
||||
Label@TIME:
|
||||
X: 3
|
||||
|
||||
142
mods/ra/chrome/multiplayer-browser.yaml
Normal file
142
mods/ra/chrome/multiplayer-browser.yaml
Normal 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
|
||||
131
mods/ra/chrome/multiplayer-createserver.yaml
Normal file
131
mods/ra/chrome/multiplayer-createserver.yaml
Normal 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
|
||||
96
mods/ra/chrome/multiplayer-directconnect.yaml
Normal file
96
mods/ra/chrome/multiplayer-directconnect.yaml
Normal 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
|
||||
@@ -8,7 +8,7 @@ Container@GLOBALCHAT_PANEL:
|
||||
Height: PARENT_BOTTOM
|
||||
Children:
|
||||
Background@TOPIC:
|
||||
Width: 565
|
||||
Width: 582
|
||||
Height: 20
|
||||
Background: dialog2
|
||||
Children:
|
||||
@@ -21,7 +21,7 @@ Container@GLOBALCHAT_PANEL:
|
||||
Align: Center
|
||||
ScrollPanel@HISTORY_PANEL:
|
||||
Y: 20
|
||||
Width: 565
|
||||
Width: 582
|
||||
Height: PARENT_BOTTOM - 50
|
||||
ItemSpacing: 5
|
||||
Children:
|
||||
@@ -32,11 +32,19 @@ Container@GLOBALCHAT_PANEL:
|
||||
WordWrap: True
|
||||
TextField@CHAT_TEXTFIELD:
|
||||
Y: PARENT_BOTTOM - 25
|
||||
Width: 565
|
||||
Width: 582
|
||||
Height: 25
|
||||
LeftMargin: 60
|
||||
Children:
|
||||
Label@LABEL_CHATTYPE:
|
||||
Y: 0-1
|
||||
Width: 55
|
||||
Height: 25
|
||||
Align: Right
|
||||
Text: Global:
|
||||
ScrollPanel@NICKNAME_PANEL:
|
||||
X: 570
|
||||
Width: 130
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Width: 174
|
||||
Height: PARENT_BOTTOM - 30
|
||||
Children:
|
||||
Container@NICKNAME_TEMPLATE:
|
||||
@@ -53,11 +61,11 @@ Container@GLOBALCHAT_PANEL:
|
||||
Width: PARENT_RIGHT-15
|
||||
Height: 20
|
||||
Button@DISCONNECT_BUTTON:
|
||||
X: 570
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Y: PARENT_BOTTOM - 25
|
||||
Width: 130
|
||||
Width: 174
|
||||
Height: 25
|
||||
Text: Disconnect
|
||||
Text: Leave Chat
|
||||
Font: Bold
|
||||
Background@GLOBALCHAT_CONNECT_PANEL:
|
||||
Width: PARENT_RIGHT
|
||||
@@ -84,6 +92,7 @@ Container@GLOBALCHAT_PANEL:
|
||||
Y: PARENT_BOTTOM / 4 + 75
|
||||
Height: 20
|
||||
Width: 180
|
||||
Font: Regular
|
||||
Text: Connect Automatically
|
||||
Button@CONNECT_BUTTON:
|
||||
X: 430
|
||||
112
mods/ra/chrome/multiplayer.yaml
Normal file
112
mods/ra/chrome/multiplayer.yaml
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -33,8 +33,8 @@ Metrics:
|
||||
FactionSuffix-soviet: soviet
|
||||
FactionSuffix-russia: soviet
|
||||
FactionSuffix-ukraine: soviet
|
||||
IncompatibleVersionColor: 211,211,211
|
||||
IncompatibleGameColor: 169,169,169
|
||||
CantJoinGameColor: 211,211,211
|
||||
ProtectedGameColor: 255,0,0
|
||||
IncompatibleProtectedGameColor: 178,34,34
|
||||
WaitingGameColor: 0,255,0
|
||||
|
||||
@@ -104,10 +104,12 @@ ChromeLayout:
|
||||
./mods/ra/chrome/lobby-globalchat.yaml
|
||||
./mods/ra/chrome/color-picker.yaml
|
||||
./mods/ra/chrome/map-chooser.yaml
|
||||
./mods/ra/chrome/create-server.yaml
|
||||
./mods/ra/chrome/serverbrowser.yaml
|
||||
./mods/ra/chrome/multiplayer.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/directconnect.yaml
|
||||
./mods/ra/chrome/replaybrowser.yaml
|
||||
./mods/ra/chrome/dropdowns.yaml
|
||||
./mods/ra/chrome/musicplayer.yaml
|
||||
@@ -116,7 +118,6 @@ ChromeLayout:
|
||||
./mods/ra/chrome/missionbrowser.yaml
|
||||
./mods/ra/chrome/confirmation-dialogs.yaml
|
||||
./mods/ra/chrome/editor.yaml
|
||||
./mods/ra/chrome/globalchat.yaml
|
||||
|
||||
Weapons:
|
||||
./mods/ra/weapons/explosions.yaml
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1000 B After Width: | Height: | Size: 3.2 KiB |
@@ -274,6 +274,8 @@ lobby-bits: spawnpoints.png
|
||||
admin: 64,5,7,5
|
||||
colorpicker: 5,5,22,22
|
||||
huepicker: 71,0,7,15
|
||||
protected: 79,0,10,13
|
||||
protected-disabled: 90,0,10,13
|
||||
|
||||
strategic: strategic.png
|
||||
unowned: 0,0,32,32
|
||||
|
||||
@@ -26,8 +26,8 @@ Metrics:
|
||||
SpawnColor: 255,255,255
|
||||
SpawnContrastColor: 0,0,0
|
||||
SpawnLabelOffset: 0,1
|
||||
IncompatibleVersionColor: 255,0,0
|
||||
IncompatibleGameColor: 169,169,169
|
||||
CantJoinGameColor: 211,211,211
|
||||
ProtectedGameColor: 255,0,0
|
||||
IncompatibleProtectedGameColor: 139,0,0
|
||||
WaitingGameColor: 0,255,0
|
||||
|
||||
@@ -158,10 +158,12 @@ ChromeLayout:
|
||||
./mods/ra/chrome/lobby-globalchat.yaml
|
||||
./mods/ts/chrome/color-picker.yaml
|
||||
./mods/ra/chrome/map-chooser.yaml
|
||||
./mods/ra/chrome/create-server.yaml
|
||||
./mods/ra/chrome/serverbrowser.yaml
|
||||
./mods/ra/chrome/multiplayer.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/directconnect.yaml
|
||||
./mods/ra/chrome/replaybrowser.yaml
|
||||
./mods/ts/chrome/dropdowns.yaml
|
||||
./mods/ra/chrome/musicplayer.yaml
|
||||
@@ -170,7 +172,6 @@ ChromeLayout:
|
||||
./mods/ra/chrome/missionbrowser.yaml
|
||||
./mods/ra/chrome/confirmation-dialogs.yaml
|
||||
./mods/ra/chrome/editor.yaml
|
||||
./mods/ra/chrome/globalchat.yaml
|
||||
|
||||
Voices:
|
||||
./mods/ts/audio/voices.yaml
|
||||
|
||||
Reference in New Issue
Block a user