Add a player list to the MP server browser.
This commit is contained in:
@@ -18,6 +18,7 @@ using System.Text;
|
|||||||
using BeaconLib;
|
using BeaconLib;
|
||||||
using OpenRA.Network;
|
using OpenRA.Network;
|
||||||
using OpenRA.Server;
|
using OpenRA.Server;
|
||||||
|
using OpenRA.Traits;
|
||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Common.Widgets.Logic
|
namespace OpenRA.Mods.Common.Widgets.Logic
|
||||||
@@ -37,13 +38,18 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
readonly ModData modData;
|
readonly ModData modData;
|
||||||
readonly WebServices services;
|
readonly WebServices services;
|
||||||
readonly Probe lanGameProbe;
|
readonly Probe lanGameProbe;
|
||||||
|
readonly ScrollItemWidget serverTemplate;
|
||||||
|
readonly ScrollItemWidget headerTemplate;
|
||||||
|
readonly Widget clientContainer;
|
||||||
|
readonly ScrollPanelWidget clientList;
|
||||||
|
readonly ScrollItemWidget clientTemplate, clientHeader;
|
||||||
|
readonly MapPreviewWidget mapPreview;
|
||||||
|
readonly ButtonWidget joinButton;
|
||||||
|
readonly int joinButtonY;
|
||||||
|
|
||||||
GameServer currentServer;
|
GameServer currentServer;
|
||||||
MapPreview currentMap;
|
MapPreview currentMap;
|
||||||
|
|
||||||
ScrollItemWidget serverTemplate;
|
|
||||||
ScrollItemWidget headerTemplate;
|
|
||||||
|
|
||||||
Action onStart;
|
Action onStart;
|
||||||
Action onExit;
|
Action onExit;
|
||||||
|
|
||||||
@@ -85,10 +91,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
headerTemplate = serverList.Get<ScrollItemWidget>("HEADER_TEMPLATE");
|
headerTemplate = serverList.Get<ScrollItemWidget>("HEADER_TEMPLATE");
|
||||||
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
|
serverTemplate = serverList.Get<ScrollItemWidget>("SERVER_TEMPLATE");
|
||||||
|
|
||||||
var join = widget.Get<ButtonWidget>("JOIN_BUTTON");
|
joinButton = widget.Get<ButtonWidget>("JOIN_BUTTON");
|
||||||
join.IsVisible = () => currentServer != null;
|
joinButton.IsVisible = () => currentServer != null;
|
||||||
join.IsDisabled = () => !currentServer.IsJoinable;
|
joinButton.IsDisabled = () => !currentServer.IsJoinable;
|
||||||
join.OnClick = () => Join(currentServer);
|
joinButton.OnClick = () => Join(currentServer);
|
||||||
|
joinButtonY = joinButton.Bounds.Y;
|
||||||
|
|
||||||
// Display the progress label over the server list
|
// Display the progress label over the server list
|
||||||
// The text is only visible when the list is empty
|
// The text is only visible when the list is empty
|
||||||
@@ -159,7 +166,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
refreshButton.OnClick = RefreshServerList;
|
refreshButton.OnClick = RefreshServerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
var mapPreview = widget.GetOrNull<MapPreviewWidget>("SELECTED_MAP_PREVIEW");
|
mapPreview = widget.GetOrNull<MapPreviewWidget>("SELECTED_MAP_PREVIEW");
|
||||||
if (mapPreview != null)
|
if (mapPreview != null)
|
||||||
mapPreview.Preview = () => currentMap;
|
mapPreview.Preview = () => currentMap;
|
||||||
|
|
||||||
@@ -201,10 +208,17 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
var players = widget.GetOrNull<LabelWidget>("SELECTED_PLAYERS");
|
var players = widget.GetOrNull<LabelWidget>("SELECTED_PLAYERS");
|
||||||
if (players != null)
|
if (players != null)
|
||||||
{
|
{
|
||||||
players.IsVisible = () => currentServer != null;
|
players.IsVisible = () => currentServer != null && !currentServer.Clients.Any();
|
||||||
players.GetText = () => PlayersLabel(currentServer);
|
players.GetText = () => PlayersLabel(currentServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clientContainer = widget.Get("CLIENT_LIST_CONTAINER");
|
||||||
|
clientList = Ui.LoadWidget("MULTIPLAYER_CLIENT_LIST", clientContainer, new WidgetArgs()) as ScrollPanelWidget;
|
||||||
|
clientList.IsVisible = () => currentServer != null && currentServer.Clients.Any();
|
||||||
|
clientHeader = clientList.Get<ScrollItemWidget>("HEADER");
|
||||||
|
clientTemplate = clientList.Get<ScrollItemWidget>("TEMPLATE");
|
||||||
|
clientList.RemoveChildren();
|
||||||
|
|
||||||
var directConnectButton = widget.Get<ButtonWidget>("DIRECTCONNECT_BUTTON");
|
var directConnectButton = widget.Get<ButtonWidget>("DIRECTCONNECT_BUTTON");
|
||||||
directConnectButton.OnClick = () =>
|
directConnectButton.OnClick = () =>
|
||||||
{
|
{
|
||||||
@@ -361,6 +375,86 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
currentServer = server;
|
currentServer = server;
|
||||||
currentMap = server != null ? modData.MapCache[server.Map] : null;
|
currentMap = server != null ? modData.MapCache[server.Map] : null;
|
||||||
|
|
||||||
|
clientList.RemoveChildren();
|
||||||
|
if (server == null || !server.Clients.Any())
|
||||||
|
{
|
||||||
|
joinButton.Bounds.Y = joinButtonY;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
joinButton.Bounds.Y = clientContainer.Bounds.Bottom;
|
||||||
|
|
||||||
|
var players = server.Clients
|
||||||
|
.Where(c => !c.IsSpectator)
|
||||||
|
.GroupBy(p => p.Team)
|
||||||
|
.OrderBy(g => g.Key);
|
||||||
|
|
||||||
|
var teams = new Dictionary<string, IEnumerable<GameClient>>();
|
||||||
|
var noTeams = players.Count() == 1;
|
||||||
|
foreach (var p in players)
|
||||||
|
{
|
||||||
|
var label = noTeams ? "Players" : p.Key == 0 ? "No Team" : "Team {0}".F(p.Key);
|
||||||
|
teams.Add(label, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (server.Clients.Any(c => c.IsSpectator))
|
||||||
|
teams.Add("Spectators", server.Clients.Where(c => c.IsSpectator));
|
||||||
|
|
||||||
|
// Can only show factions if the server is running the same mod
|
||||||
|
var disableFactionDisplay = server.Mod != modData.Manifest.Id;
|
||||||
|
|
||||||
|
if (mapPreview != null)
|
||||||
|
{
|
||||||
|
var spawns = currentMap.SpawnPoints;
|
||||||
|
var occupants = server.Clients
|
||||||
|
.Where(c => (c.SpawnPoint - 1 >= 0) && (c.SpawnPoint - 1 < spawns.Length))
|
||||||
|
.ToDictionary(c => spawns[c.SpawnPoint - 1], c => new SpawnOccupant(c, disableFactionDisplay));
|
||||||
|
|
||||||
|
mapPreview.SpawnOccupants = () => occupants;
|
||||||
|
}
|
||||||
|
|
||||||
|
var factionInfo = modData.DefaultRules.Actors["world"].TraitInfos<FactionInfo>();
|
||||||
|
foreach (var kv in teams)
|
||||||
|
{
|
||||||
|
var group = kv.Key;
|
||||||
|
if (group.Length > 0)
|
||||||
|
{
|
||||||
|
var header = ScrollItemWidget.Setup(clientHeader, () => true, () => { });
|
||||||
|
header.Get<LabelWidget>("LABEL").GetText = () => group;
|
||||||
|
clientList.AddChild(header);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var option in kv.Value)
|
||||||
|
{
|
||||||
|
var o = option;
|
||||||
|
|
||||||
|
var item = ScrollItemWidget.Setup(clientTemplate, () => false, () => { });
|
||||||
|
if (!o.IsSpectator && !disableFactionDisplay)
|
||||||
|
{
|
||||||
|
var label = item.Get<LabelWidget>("LABEL");
|
||||||
|
var font = Game.Renderer.Fonts[label.Font];
|
||||||
|
var name = WidgetUtils.TruncateText(o.Name, label.Bounds.Width, font);
|
||||||
|
label.GetText = () => name;
|
||||||
|
label.GetColor = () => o.Color.RGB;
|
||||||
|
|
||||||
|
var flag = item.Get<ImageWidget>("FLAG");
|
||||||
|
flag.IsVisible = () => true;
|
||||||
|
flag.GetImageCollection = () => "flags";
|
||||||
|
flag.GetImageName = () => (factionInfo != null && factionInfo.Any(f => f.InternalName == o.Faction)) ? o.Faction : "Random";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var label = item.Get<LabelWidget>("NOFLAG_LABEL");
|
||||||
|
var font = Game.Renderer.Fonts[label.Font];
|
||||||
|
var name = WidgetUtils.TruncateText(o.Name, label.Bounds.Width, font);
|
||||||
|
label.GetText = () => name;
|
||||||
|
label.GetColor = () => o.Color.RGB;
|
||||||
|
}
|
||||||
|
|
||||||
|
clientList.AddChild(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RefreshServerListInner(List<GameServer> games)
|
void RefreshServerListInner(List<GameServer> games)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
public class SpawnOccupant
|
public class SpawnOccupant
|
||||||
{
|
{
|
||||||
public readonly HSLColor Color;
|
public readonly HSLColor Color;
|
||||||
public readonly int ClientIndex;
|
|
||||||
public readonly string PlayerName;
|
public readonly string PlayerName;
|
||||||
public readonly int Team;
|
public readonly int Team;
|
||||||
public readonly string Faction;
|
public readonly string Faction;
|
||||||
@@ -31,7 +30,6 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
public SpawnOccupant(Session.Client client)
|
public SpawnOccupant(Session.Client client)
|
||||||
{
|
{
|
||||||
Color = client.Color;
|
Color = client.Color;
|
||||||
ClientIndex = client.Index;
|
|
||||||
PlayerName = client.Name;
|
PlayerName = client.Name;
|
||||||
Team = client.Team;
|
Team = client.Team;
|
||||||
Faction = client.Faction;
|
Faction = client.Faction;
|
||||||
@@ -41,12 +39,20 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
public SpawnOccupant(GameInformation.Player player)
|
public SpawnOccupant(GameInformation.Player player)
|
||||||
{
|
{
|
||||||
Color = player.Color;
|
Color = player.Color;
|
||||||
ClientIndex = player.ClientIndex;
|
|
||||||
PlayerName = player.Name;
|
PlayerName = player.Name;
|
||||||
Team = player.Team;
|
Team = player.Team;
|
||||||
Faction = player.FactionId;
|
Faction = player.FactionId;
|
||||||
SpawnPoint = player.SpawnPoint;
|
SpawnPoint = player.SpawnPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SpawnOccupant(GameClient player, bool suppressFaction)
|
||||||
|
{
|
||||||
|
Color = player.Color;
|
||||||
|
PlayerName = player.Name;
|
||||||
|
Team = player.Team;
|
||||||
|
Faction = !suppressFaction ? player.Faction : null;
|
||||||
|
SpawnPoint = player.SpawnPoint;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MapPreviewWidget : Widget
|
public class MapPreviewWidget : Widget
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ Container@MULTIPLAYER_PANEL:
|
|||||||
Y: 1
|
Y: 1
|
||||||
Width: PARENT_RIGHT - 2
|
Width: PARENT_RIGHT - 2
|
||||||
Height: PARENT_BOTTOM - 2
|
Height: PARENT_BOTTOM - 2
|
||||||
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
Label@SELECTED_MAP:
|
Label@SELECTED_MAP:
|
||||||
Y: 172
|
Y: 172
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
@@ -148,6 +149,10 @@ Container@MULTIPLAYER_PANEL:
|
|||||||
Height: 25
|
Height: 25
|
||||||
Font: TinyBold
|
Font: TinyBold
|
||||||
Align: Center
|
Align: Center
|
||||||
|
Container@CLIENT_LIST_CONTAINER:
|
||||||
|
Y: 240
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 230
|
||||||
Button@JOIN_BUTTON:
|
Button@JOIN_BUTTON:
|
||||||
Key: return
|
Key: return
|
||||||
Y: 255
|
Y: 255
|
||||||
@@ -186,48 +191,3 @@ Container@MULTIPLAYER_PANEL:
|
|||||||
Height: 35
|
Height: 35
|
||||||
Text: Back
|
Text: Back
|
||||||
TooltipContainer@TOOLTIP_CONTAINER:
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
|
|
||||||
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
|
|
||||||
Width: 147
|
|
||||||
Height: 130
|
|
||||||
Background: panel-black
|
|
||||||
Children:
|
|
||||||
Checkbox@WAITING_FOR_PLAYERS:
|
|
||||||
X: 5
|
|
||||||
Y: 5
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Waiting
|
|
||||||
TextColor: 32CD32
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@EMPTY:
|
|
||||||
X: 5
|
|
||||||
Y: 30
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Empty
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@PASSWORD_PROTECTED:
|
|
||||||
X: 5
|
|
||||||
Y: 55
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Protected
|
|
||||||
TextColor: FF0000
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@ALREADY_STARTED:
|
|
||||||
X: 5
|
|
||||||
Y: 80
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Started
|
|
||||||
TextColor: FFA500
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@INCOMPATIBLE_VERSION:
|
|
||||||
X: 5
|
|
||||||
Y: 105
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Incompatible
|
|
||||||
TextColor: BEBEBE
|
|
||||||
Font: Regular
|
|
||||||
|
|||||||
85
mods/cnc/chrome/multiplayer-browserpanels.yaml
Normal file
85
mods/cnc/chrome/multiplayer-browserpanels.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
ScrollPanel@MULTIPLAYER_CLIENT_LIST:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 225
|
||||||
|
IgnoreChildMouseOver: true
|
||||||
|
Children:
|
||||||
|
ScrollItem@HEADER:
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 13
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
Font: TinyBold
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 10
|
||||||
|
Align: Center
|
||||||
|
ScrollItem@TEMPLATE:
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 25
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Image@FLAG:
|
||||||
|
X: 4
|
||||||
|
Y: 5
|
||||||
|
Width: 32
|
||||||
|
Height: 16
|
||||||
|
Visible: False
|
||||||
|
Label@LABEL:
|
||||||
|
X: 40
|
||||||
|
Width: PARENT_RIGHT - 50
|
||||||
|
Height: 23
|
||||||
|
Shadow: True
|
||||||
|
Label@NOFLAG_LABEL:
|
||||||
|
X: 5
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 23
|
||||||
|
Shadow: True
|
||||||
|
|
||||||
|
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
|
||||||
|
Width: 147
|
||||||
|
Height: 130
|
||||||
|
Background: panel-black
|
||||||
|
Children:
|
||||||
|
Checkbox@WAITING_FOR_PLAYERS:
|
||||||
|
X: 5
|
||||||
|
Y: 5
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Waiting
|
||||||
|
TextColor: 32CD32
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@EMPTY:
|
||||||
|
X: 5
|
||||||
|
Y: 30
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Empty
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@PASSWORD_PROTECTED:
|
||||||
|
X: 5
|
||||||
|
Y: 55
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Protected
|
||||||
|
TextColor: FF0000
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@ALREADY_STARTED:
|
||||||
|
X: 5
|
||||||
|
Y: 80
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Started
|
||||||
|
TextColor: FFA500
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@INCOMPATIBLE_VERSION:
|
||||||
|
X: 5
|
||||||
|
Y: 105
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Incompatible
|
||||||
|
TextColor: BEBEBE
|
||||||
|
Font: Regular
|
||||||
@@ -90,6 +90,7 @@ Assemblies:
|
|||||||
ChromeLayout:
|
ChromeLayout:
|
||||||
cnc|chrome/mainmenu.yaml
|
cnc|chrome/mainmenu.yaml
|
||||||
cnc|chrome/multiplayer-browser.yaml
|
cnc|chrome/multiplayer-browser.yaml
|
||||||
|
cnc|chrome/multiplayer-browserpanels.yaml
|
||||||
cnc|chrome/multiplayer-createserver.yaml
|
cnc|chrome/multiplayer-createserver.yaml
|
||||||
cnc|chrome/multiplayer-directconnect.yaml
|
cnc|chrome/multiplayer-directconnect.yaml
|
||||||
cnc|chrome/lobby.yaml
|
cnc|chrome/lobby.yaml
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Background@MULTIPLAYER_PANEL:
|
|||||||
X: (WINDOW_RIGHT - WIDTH) / 2
|
X: (WINDOW_RIGHT - WIDTH) / 2
|
||||||
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
Y: (WINDOW_BOTTOM - HEIGHT) / 2
|
||||||
Width: 808
|
Width: 808
|
||||||
Height: 600
|
Height: 550
|
||||||
Children:
|
Children:
|
||||||
Label@TITLE:
|
Label@TITLE:
|
||||||
Y: 15
|
Y: 15
|
||||||
@@ -114,6 +114,7 @@ Background@MULTIPLAYER_PANEL:
|
|||||||
Y: 1
|
Y: 1
|
||||||
Width: PARENT_RIGHT - 2
|
Width: PARENT_RIGHT - 2
|
||||||
Height: PARENT_BOTTOM - 2
|
Height: PARENT_BOTTOM - 2
|
||||||
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
Label@SELECTED_MAP:
|
Label@SELECTED_MAP:
|
||||||
Y: 172
|
Y: 172
|
||||||
Width: PARENT_RIGHT
|
Width: PARENT_RIGHT
|
||||||
@@ -144,6 +145,10 @@ Background@MULTIPLAYER_PANEL:
|
|||||||
Height: 25
|
Height: 25
|
||||||
Font: TinyBold
|
Font: TinyBold
|
||||||
Align: Center
|
Align: Center
|
||||||
|
Container@CLIENT_LIST_CONTAINER:
|
||||||
|
Y: 240
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 166
|
||||||
Button@JOIN_BUTTON:
|
Button@JOIN_BUTTON:
|
||||||
Key: return
|
Key: return
|
||||||
Y: 255
|
Y: 255
|
||||||
@@ -188,47 +193,3 @@ Background@MULTIPLAYER_PANEL:
|
|||||||
Text: Back
|
Text: Back
|
||||||
Font: Bold
|
Font: Bold
|
||||||
TooltipContainer@TOOLTIP_CONTAINER:
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
|
|
||||||
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
|
|
||||||
Width: 158
|
|
||||||
Height: 130
|
|
||||||
Children:
|
|
||||||
Checkbox@WAITING_FOR_PLAYERS:
|
|
||||||
X: 5
|
|
||||||
Y: 5
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Waiting
|
|
||||||
TextColor: 32CD32
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@EMPTY:
|
|
||||||
X: 5
|
|
||||||
Y: 30
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Empty
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@PASSWORD_PROTECTED:
|
|
||||||
X: 5
|
|
||||||
Y: 55
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Protected
|
|
||||||
TextColor: FF0000
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@ALREADY_STARTED:
|
|
||||||
X: 5
|
|
||||||
Y: 80
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Started
|
|
||||||
TextColor: FFA500
|
|
||||||
Font: Regular
|
|
||||||
Checkbox@INCOMPATIBLE_VERSION:
|
|
||||||
X: 5
|
|
||||||
Y: 105
|
|
||||||
Width: PARENT_RIGHT - 29
|
|
||||||
Height: 20
|
|
||||||
Text: Incompatible
|
|
||||||
TextColor: BEBEBE
|
|
||||||
Font: Regular
|
|
||||||
85
mods/common/chrome/multiplayer-browserpanels.yaml
Normal file
85
mods/common/chrome/multiplayer-browserpanels.yaml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
ScrollPanel@MULTIPLAYER_CLIENT_LIST:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 159
|
||||||
|
IgnoreChildMouseOver: true
|
||||||
|
Children:
|
||||||
|
ScrollItem@HEADER:
|
||||||
|
BaseName: scrollheader
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 13
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
Font: TinyBold
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 10
|
||||||
|
Align: Center
|
||||||
|
ScrollItem@TEMPLATE:
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 25
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Image@FLAG:
|
||||||
|
X: 4
|
||||||
|
Y: 6
|
||||||
|
Width: 32
|
||||||
|
Height: 16
|
||||||
|
Visible: False
|
||||||
|
Label@LABEL:
|
||||||
|
X: 40
|
||||||
|
Width: PARENT_RIGHT - 50
|
||||||
|
Height: 23
|
||||||
|
Shadow: True
|
||||||
|
Label@NOFLAG_LABEL:
|
||||||
|
X: 5
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 23
|
||||||
|
Shadow: True
|
||||||
|
|
||||||
|
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
|
||||||
|
Width: 158
|
||||||
|
Height: 130
|
||||||
|
Children:
|
||||||
|
Checkbox@WAITING_FOR_PLAYERS:
|
||||||
|
X: 5
|
||||||
|
Y: 5
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Waiting
|
||||||
|
TextColor: 32CD32
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@EMPTY:
|
||||||
|
X: 5
|
||||||
|
Y: 30
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Empty
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@PASSWORD_PROTECTED:
|
||||||
|
X: 5
|
||||||
|
Y: 55
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Protected
|
||||||
|
TextColor: FF0000
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@ALREADY_STARTED:
|
||||||
|
X: 5
|
||||||
|
Y: 80
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Started
|
||||||
|
TextColor: FFA500
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@INCOMPATIBLE_VERSION:
|
||||||
|
X: 5
|
||||||
|
Y: 105
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Incompatible
|
||||||
|
TextColor: BEBEBE
|
||||||
|
Font: Regular
|
||||||
84
mods/d2k/chrome/multiplayer-browserpanels.yaml
Normal file
84
mods/d2k/chrome/multiplayer-browserpanels.yaml
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
ScrollPanel@MULTIPLAYER_CLIENT_LIST:
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 159
|
||||||
|
IgnoreChildMouseOver: true
|
||||||
|
Children:
|
||||||
|
ScrollItem@HEADER:
|
||||||
|
BaseName: scrollheader
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 13
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Label@LABEL:
|
||||||
|
Font: TinyBold
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 10
|
||||||
|
Align: Center
|
||||||
|
ScrollItem@TEMPLATE:
|
||||||
|
Width: PARENT_RIGHT - 27
|
||||||
|
Height: 25
|
||||||
|
X: 2
|
||||||
|
Y: 0
|
||||||
|
Visible: false
|
||||||
|
Children:
|
||||||
|
Image@FLAG:
|
||||||
|
X: 4
|
||||||
|
Y: 2
|
||||||
|
Width: 32
|
||||||
|
Height: 16
|
||||||
|
Visible: False
|
||||||
|
Label@LABEL:
|
||||||
|
X: 35
|
||||||
|
Width: PARENT_RIGHT - 45
|
||||||
|
Height: 23
|
||||||
|
Shadow: True
|
||||||
|
Label@NOFLAG_LABEL:
|
||||||
|
X: 5
|
||||||
|
Width: PARENT_RIGHT
|
||||||
|
Height: 23
|
||||||
|
|
||||||
|
ScrollPanel@MULTIPLAYER_FILTER_PANEL:
|
||||||
|
Width: 158
|
||||||
|
Height: 130
|
||||||
|
Children:
|
||||||
|
Checkbox@WAITING_FOR_PLAYERS:
|
||||||
|
X: 5
|
||||||
|
Y: 5
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Waiting
|
||||||
|
TextColor: 32CD32
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@EMPTY:
|
||||||
|
X: 5
|
||||||
|
Y: 30
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Empty
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@PASSWORD_PROTECTED:
|
||||||
|
X: 5
|
||||||
|
Y: 55
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Protected
|
||||||
|
TextColor: FF0000
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@ALREADY_STARTED:
|
||||||
|
X: 5
|
||||||
|
Y: 80
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Started
|
||||||
|
TextColor: FFA500
|
||||||
|
Font: Regular
|
||||||
|
Checkbox@INCOMPATIBLE_VERSION:
|
||||||
|
X: 5
|
||||||
|
Y: 105
|
||||||
|
Width: PARENT_RIGHT - 29
|
||||||
|
Height: 20
|
||||||
|
Text: Incompatible
|
||||||
|
TextColor: BEBEBE
|
||||||
|
Font: Regular
|
||||||
@@ -91,6 +91,7 @@ ChromeLayout:
|
|||||||
common|chrome/color-picker.yaml
|
common|chrome/color-picker.yaml
|
||||||
common|chrome/map-chooser.yaml
|
common|chrome/map-chooser.yaml
|
||||||
common|chrome/multiplayer-browser.yaml
|
common|chrome/multiplayer-browser.yaml
|
||||||
|
d2k|chrome/multiplayer-browserpanels.yaml
|
||||||
common|chrome/multiplayer-createserver.yaml
|
common|chrome/multiplayer-createserver.yaml
|
||||||
common|chrome/multiplayer-directconnect.yaml
|
common|chrome/multiplayer-directconnect.yaml
|
||||||
common|chrome/connection.yaml
|
common|chrome/connection.yaml
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ ChromeLayout:
|
|||||||
common|chrome/color-picker.yaml
|
common|chrome/color-picker.yaml
|
||||||
common|chrome/map-chooser.yaml
|
common|chrome/map-chooser.yaml
|
||||||
common|chrome/multiplayer-browser.yaml
|
common|chrome/multiplayer-browser.yaml
|
||||||
|
common|chrome/multiplayer-browserpanels.yaml
|
||||||
common|chrome/multiplayer-createserver.yaml
|
common|chrome/multiplayer-createserver.yaml
|
||||||
common|chrome/multiplayer-directconnect.yaml
|
common|chrome/multiplayer-directconnect.yaml
|
||||||
common|chrome/connection.yaml
|
common|chrome/connection.yaml
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ ChromeLayout:
|
|||||||
ts|chrome/color-picker.yaml
|
ts|chrome/color-picker.yaml
|
||||||
common|chrome/map-chooser.yaml
|
common|chrome/map-chooser.yaml
|
||||||
common|chrome/multiplayer-browser.yaml
|
common|chrome/multiplayer-browser.yaml
|
||||||
|
common|chrome/multiplayer-browserpanels.yaml
|
||||||
common|chrome/multiplayer-createserver.yaml
|
common|chrome/multiplayer-createserver.yaml
|
||||||
common|chrome/multiplayer-directconnect.yaml
|
common|chrome/multiplayer-directconnect.yaml
|
||||||
common|chrome/connection.yaml
|
common|chrome/connection.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user