Merge pull request #3164 from pchote/lobby-tooltips
New/Improved lobby tooltips which show IP, admin status and explain ping.
This commit is contained in:
@@ -53,6 +53,7 @@ namespace OpenRA.Network
|
|||||||
public string Country;
|
public string Country;
|
||||||
public int SpawnPoint;
|
public int SpawnPoint;
|
||||||
public string Name;
|
public string Name;
|
||||||
|
public string IpAddress;
|
||||||
public ClientState State;
|
public ClientState State;
|
||||||
public int Team;
|
public int Team;
|
||||||
public string Slot; // slot ID, or null for observer
|
public string Slot; // slot ID, or null for observer
|
||||||
@@ -61,9 +62,9 @@ namespace OpenRA.Network
|
|||||||
public bool IsAdmin;
|
public bool IsAdmin;
|
||||||
public bool IsReady { get { return State == ClientState.Ready; } }
|
public bool IsReady { get { return State == ClientState.Ready; } }
|
||||||
public bool IsObserver { get { return Slot == null; } }
|
public bool IsObserver { get { return Slot == null; } }
|
||||||
public int Ping = -1;
|
public int Latency = -1;
|
||||||
public int PingJitter = -1;
|
public int LatencyJitter = -1;
|
||||||
public int[] PingHistory = {};
|
public int[] LatencyHistory = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Slot
|
public class Slot
|
||||||
|
|||||||
@@ -223,6 +223,7 @@
|
|||||||
<Compile Include="Widgets\TooltipContainerWidget.cs" />
|
<Compile Include="Widgets\TooltipContainerWidget.cs" />
|
||||||
<Compile Include="Traits\DebugPauseState.cs" />
|
<Compile Include="Traits\DebugPauseState.cs" />
|
||||||
<Compile Include="Network\UPnP.cs" />
|
<Compile Include="Network\UPnP.cs" />
|
||||||
|
<Compile Include="Widgets\ClientTooltipRegionWidget.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
|
|||||||
@@ -263,11 +263,13 @@ namespace OpenRA.Server
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
client.IpAddress = ((IPEndPoint)newConn.socket.RemoteEndPoint).Address.ToString();
|
||||||
|
|
||||||
// Check if IP is banned
|
// Check if IP is banned
|
||||||
if (lobbyInfo.GlobalSettings.Ban != null)
|
if (lobbyInfo.GlobalSettings.Ban != null)
|
||||||
{
|
{
|
||||||
var remote_addr = ((IPEndPoint)newConn.socket.RemoteEndPoint).Address.ToString();
|
|
||||||
if (lobbyInfo.GlobalSettings.Ban.Contains(remote_addr))
|
if (lobbyInfo.GlobalSettings.Ban.Contains(client.IpAddress))
|
||||||
{
|
{
|
||||||
Console.WriteLine("Rejected connection from "+client.Name+"("+newConn.socket.RemoteEndPoint+"); Banned.");
|
Console.WriteLine("Rejected connection from "+client.Name+"("+newConn.socket.RemoteEndPoint+"); Banned.");
|
||||||
Log.Write("server", "Rejected connection from {0}; Banned.",
|
Log.Write("server", "Rejected connection from {0}; Banned.",
|
||||||
@@ -469,16 +471,16 @@ namespace OpenRA.Server
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var history = fromClient.PingHistory.ToList();
|
var history = fromClient.LatencyHistory.ToList();
|
||||||
history.Add(Environment.TickCount - pingSent);
|
history.Add(Environment.TickCount - pingSent);
|
||||||
|
|
||||||
// Cap ping history at 5 values (25 seconds)
|
// Cap ping history at 5 values (25 seconds)
|
||||||
if (history.Count > 5)
|
if (history.Count > 5)
|
||||||
history.RemoveRange(0, history.Count - 5);
|
history.RemoveRange(0, history.Count - 5);
|
||||||
|
|
||||||
fromClient.Ping = history.Sum() / history.Count;
|
fromClient.Latency = history.Sum() / history.Count;
|
||||||
fromClient.PingJitter = (history.Max() - history.Min())/2;
|
fromClient.LatencyJitter = (history.Max() - history.Min())/2;
|
||||||
fromClient.PingHistory = history.ToArray();
|
fromClient.LatencyHistory = history.ToArray();
|
||||||
|
|
||||||
if (State == ServerState.WaitingPlayers)
|
if (State == ServerState.WaitingPlayers)
|
||||||
SyncLobbyInfo();
|
SyncLobbyInfo();
|
||||||
|
|||||||
67
OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs
Normal file
67
OpenRA.Game/Widgets/ClientTooltipRegionWidget.cs
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Graphics;
|
||||||
|
using OpenRA.Network;
|
||||||
|
|
||||||
|
namespace OpenRA.Widgets
|
||||||
|
{
|
||||||
|
public class ClientTooltipRegionWidget : Widget
|
||||||
|
{
|
||||||
|
public readonly string Template;
|
||||||
|
public readonly string TooltipContainer;
|
||||||
|
Lazy<TooltipContainerWidget> tooltipContainer;
|
||||||
|
OrderManager orderManager;
|
||||||
|
int clientIndex;
|
||||||
|
|
||||||
|
public ClientTooltipRegionWidget() : base()
|
||||||
|
{
|
||||||
|
tooltipContainer = Lazy.New(() => Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ClientTooltipRegionWidget(ClientTooltipRegionWidget other)
|
||||||
|
: base(other)
|
||||||
|
{
|
||||||
|
Template = other.Template;
|
||||||
|
TooltipContainer = other.TooltipContainer;
|
||||||
|
tooltipContainer = Lazy.New(() => Ui.Root.Get<TooltipContainerWidget>(TooltipContainer));
|
||||||
|
orderManager = other.orderManager;
|
||||||
|
clientIndex = other.clientIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Widget Clone() { return new ClientTooltipRegionWidget(this); }
|
||||||
|
|
||||||
|
public void Bind(OrderManager orderManager, int clientIndex)
|
||||||
|
{
|
||||||
|
this.orderManager = orderManager;
|
||||||
|
this.clientIndex = clientIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MouseEntered()
|
||||||
|
{
|
||||||
|
if (TooltipContainer == null)
|
||||||
|
return;
|
||||||
|
tooltipContainer.Value.SetTooltip(Template, new WidgetArgs() {{"orderManager", orderManager}, {"clientIndex", clientIndex}});
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void MouseExited()
|
||||||
|
{
|
||||||
|
if (TooltipContainer == null)
|
||||||
|
return;
|
||||||
|
tooltipContainer.Value.RemoveTooltip();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,7 +24,6 @@ namespace OpenRA.Widgets
|
|||||||
public Func<Map> Map = () => null;
|
public Func<Map> Map = () => null;
|
||||||
public Func<Dictionary<int2, Session.Client>> SpawnClients = () => new Dictionary<int2, Session.Client>();
|
public Func<Dictionary<int2, Session.Client>> SpawnClients = () => new Dictionary<int2, Session.Client>();
|
||||||
public Action<MouseInput> OnMouseDown = _ => {};
|
public Action<MouseInput> OnMouseDown = _ => {};
|
||||||
public Action<int, int2> OnTooltip = (_, __) => { };
|
|
||||||
public bool IgnoreMouseInput = false;
|
public bool IgnoreMouseInput = false;
|
||||||
public bool ShowSpawnPoints = true;
|
public bool ShowSpawnPoints = true;
|
||||||
|
|
||||||
@@ -147,13 +146,7 @@ namespace OpenRA.Widgets
|
|||||||
Game.Renderer.RgbaSpriteRenderer.DrawSprite(sprite, pos + offset);
|
Game.Renderer.RgbaSpriteRenderer.DrawSprite(sprite, pos + offset);
|
||||||
|
|
||||||
if ((pos - Viewport.LastMousePos).LengthSquared < 64)
|
if ((pos - Viewport.LastMousePos).LengthSquared < 64)
|
||||||
{
|
|
||||||
TooltipSpawnIndex = spawnPoints.IndexOf(p) + 1;
|
TooltipSpawnIndex = spawnPoints.IndexOf(p) + 1;
|
||||||
|
|
||||||
// Legacy tooltip behavior
|
|
||||||
if (TooltipContainer == null)
|
|
||||||
OnTooltip(TooltipSpawnIndex, pos);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,6 @@
|
|||||||
<Compile Include="WithFire.cs" />
|
<Compile Include="WithFire.cs" />
|
||||||
<Compile Include="WithRoof.cs" />
|
<Compile Include="WithRoof.cs" />
|
||||||
<Compile Include="Widgets\ResourceBarWidget.cs" />
|
<Compile Include="Widgets\ResourceBarWidget.cs" />
|
||||||
<Compile Include="Widgets\Logic\SpawnSelectorTooltipLogic.cs" />
|
|
||||||
<Compile Include="Widgets\Logic\ProductionTabsLogic.cs" />
|
<Compile Include="Widgets\Logic\ProductionTabsLogic.cs" />
|
||||||
<Compile Include="Widgets\ProductionTypeButtonWidget.cs" />
|
<Compile Include="Widgets\ProductionTypeButtonWidget.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -430,6 +430,8 @@
|
|||||||
<Compile Include="BridgeHut.cs" />
|
<Compile Include="BridgeHut.cs" />
|
||||||
<Compile Include="Lint\CheckSequences.cs" />
|
<Compile Include="Lint\CheckSequences.cs" />
|
||||||
<Compile Include="ServerTraits\PlayerPinger.cs" />
|
<Compile Include="ServerTraits\PlayerPinger.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\SpawnSelectorTooltipLogic.cs" />
|
||||||
|
<Compile Include="Widgets\Logic\ClientTooltipLogic.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||||
|
|||||||
64
OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs
Normal file
64
OpenRA.Mods.RA/Widgets/Logic/ClientTooltipLogic.cs
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||||
|
* This file is part of OpenRA, which is free software. It is made
|
||||||
|
* available to you under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation. For more information,
|
||||||
|
* see COPYING.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Widgets;
|
||||||
|
using OpenRA.Network;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
|
{
|
||||||
|
public class ClientTooltipLogic
|
||||||
|
{
|
||||||
|
[ObjectCreator.UseCtor]
|
||||||
|
public ClientTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, OrderManager orderManager, int clientIndex)
|
||||||
|
{
|
||||||
|
var admin = widget.Get<LabelWidget>("ADMIN");
|
||||||
|
var adminFont = Game.Renderer.Fonts[admin.Font];
|
||||||
|
|
||||||
|
var latency = widget.Get<LabelWidget>("LATENCY");
|
||||||
|
var latencyFont = Game.Renderer.Fonts[latency.Font];
|
||||||
|
|
||||||
|
var ip = widget.Get<LabelWidget>("IP");
|
||||||
|
var ipFont = Game.Renderer.Fonts[ip.Font];
|
||||||
|
|
||||||
|
var ipOffset = ip.Bounds.Y;
|
||||||
|
var latencyOffset = latency.Bounds.Y;
|
||||||
|
var tooltipHeight = widget.Bounds.Height;
|
||||||
|
|
||||||
|
var margin = widget.Bounds.Width;
|
||||||
|
tooltipContainer.BeforeRender = () =>
|
||||||
|
{
|
||||||
|
var width = Math.Max(adminFont.Measure(admin.GetText()).X, Math.Max(ipFont.Measure(ip.GetText()).X, latencyFont.Measure(latency.GetText()).X));
|
||||||
|
widget.Bounds.Width = width + 2*margin;
|
||||||
|
latency.Bounds.Width = widget.Bounds.Width;
|
||||||
|
ip.Bounds.Width = widget.Bounds.Width;
|
||||||
|
admin.Bounds.Width = widget.Bounds.Width;
|
||||||
|
|
||||||
|
ip.Bounds.Y = ipOffset;
|
||||||
|
latency.Bounds.Y = latencyOffset;
|
||||||
|
widget.Bounds.Height = tooltipHeight;
|
||||||
|
|
||||||
|
if (admin.IsVisible())
|
||||||
|
{
|
||||||
|
ip.Bounds.Y += admin.Bounds.Height;
|
||||||
|
latency.Bounds.Y += admin.Bounds.Height;
|
||||||
|
widget.Bounds.Height += admin.Bounds.Height;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
admin.IsVisible = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex).IsAdmin;
|
||||||
|
latency.GetText = () => "Latency: {0}".F(LobbyUtils.LatencyDescription(orderManager.LobbyInfo.ClientWithIndex(clientIndex).Latency));
|
||||||
|
ip.GetText = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex).IpAddress;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
mapPreview.IsVisible = () => Map != null;
|
mapPreview.IsVisible = () => Map != null;
|
||||||
mapPreview.Map = () => Map;
|
mapPreview.Map = () => Map;
|
||||||
mapPreview.OnMouseDown = mi => LobbyUtils.SelectSpawnPoint( orderManager, mapPreview, Map, mi );
|
mapPreview.OnMouseDown = mi => LobbyUtils.SelectSpawnPoint( orderManager, mapPreview, Map, mi );
|
||||||
mapPreview.OnTooltip = (spawnPoint, pos) => LobbyUtils.ShowSpawnPointTooltip(orderManager, spawnPoint, pos);
|
|
||||||
mapPreview.SpawnClients = () => LobbyUtils.GetSpawnClients(orderManager, Map);
|
mapPreview.SpawnClients = () => LobbyUtils.GetSpawnClients(orderManager, Map);
|
||||||
|
|
||||||
var mapTitle = lobby.GetOrNull<LabelWidget>("MAP_TITLE");
|
var mapTitle = lobby.GetOrNull<LabelWidget>("MAP_TITLE");
|
||||||
@@ -389,7 +388,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
if (template == null || template.Id != EditablePlayerTemplate.Id)
|
if (template == null || template.Id != EditablePlayerTemplate.Id)
|
||||||
template = EditablePlayerTemplate.Clone();
|
template = EditablePlayerTemplate.Clone();
|
||||||
|
|
||||||
LobbyUtils.SetupAdminPingWidget(template, slot, client, orderManager, client.Bot == null);
|
LobbyUtils.SetupClientWidget(template, slot, client, orderManager, client.Bot == null);
|
||||||
|
|
||||||
if (client.Bot != null)
|
if (client.Bot != null)
|
||||||
LobbyUtils.SetupEditableSlotWidget(template, slot, client, orderManager);
|
LobbyUtils.SetupEditableSlotWidget(template, slot, client, orderManager);
|
||||||
@@ -409,7 +408,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
if (template == null || template.Id != NonEditablePlayerTemplate.Id)
|
if (template == null || template.Id != NonEditablePlayerTemplate.Id)
|
||||||
template = NonEditablePlayerTemplate.Clone();
|
template = NonEditablePlayerTemplate.Clone();
|
||||||
|
|
||||||
LobbyUtils.SetupAdminPingWidget(template, slot, client, orderManager, client.Bot == null);
|
LobbyUtils.SetupClientWidget(template, slot, client, orderManager, client.Bot == null);
|
||||||
LobbyUtils.SetupNameWidget(template, slot, client);
|
LobbyUtils.SetupNameWidget(template, slot, client);
|
||||||
LobbyUtils.SetupKickWidget(template, slot, client, orderManager);
|
LobbyUtils.SetupKickWidget(template, slot, client, orderManager);
|
||||||
LobbyUtils.SetupColorWidget(template, slot, client);
|
LobbyUtils.SetupColorWidget(template, slot, client);
|
||||||
@@ -460,7 +459,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
LobbyUtils.SetupReadyWidget(template, null, client);
|
LobbyUtils.SetupReadyWidget(template, null, client);
|
||||||
}
|
}
|
||||||
|
|
||||||
LobbyUtils.SetupAdminPingWidget(template, null, c, orderManager, true);
|
LobbyUtils.SetupClientWidget(template, null, c, orderManager, true);
|
||||||
template.IsVisible = () => true;
|
template.IsVisible = () => true;
|
||||||
|
|
||||||
if (idx >= Players.Children.Count)
|
if (idx >= Players.Children.Count)
|
||||||
|
|||||||
@@ -158,35 +158,42 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void ShowSpawnPointTooltip(OrderManager orderManager, int spawnPoint, int2 position)
|
public static Color LatencyColor(int latency)
|
||||||
{
|
{
|
||||||
var client = orderManager.LobbyInfo.Clients.FirstOrDefault(c => c.SpawnPoint == spawnPoint);
|
// Levels set relative to the default order lag of 3 net ticks (360ms)
|
||||||
if (client != null)
|
// TODO: Adjust this once dynamic lag is implemented
|
||||||
{
|
if (latency < 0)
|
||||||
Game.Renderer.Fonts["Bold"].DrawTextWithContrast(client.Name, position + new int2(5, 5), Color.White, Color.Black, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static Color GetPingColor(Session.Client c)
|
|
||||||
{
|
|
||||||
if (c.Ping < 0) // Ping unknown
|
|
||||||
return Color.Gray;
|
return Color.Gray;
|
||||||
if (c.Ping > 720) // OrderLag > 6
|
if (latency < 300)
|
||||||
return Color.Red;
|
return Color.LimeGreen;
|
||||||
if (c.Ping > 360) // OrderLag > 3
|
if (latency < 600)
|
||||||
return Color.Orange;
|
return Color.Orange;
|
||||||
|
return Color.Red;
|
||||||
return Color.LimeGreen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetupAdminPingWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, bool visible)
|
public static string LatencyDescription(int latency)
|
||||||
|
{
|
||||||
|
if (latency < 0)
|
||||||
|
return "Unknown";
|
||||||
|
if (latency < 300)
|
||||||
|
return "Good";
|
||||||
|
if (latency < 600)
|
||||||
|
return "Moderate";
|
||||||
|
return "Poor";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetupClientWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager, bool visible)
|
||||||
{
|
{
|
||||||
parent.Get("ADMIN_INDICATOR").IsVisible = () => c.IsAdmin;
|
parent.Get("ADMIN_INDICATOR").IsVisible = () => c.IsAdmin;
|
||||||
var block = parent.Get("PING_BLOCK");
|
var block = parent.Get("LATENCY");
|
||||||
block.IsVisible = () => visible;
|
block.IsVisible = () => visible;
|
||||||
|
|
||||||
if (visible)
|
if (visible)
|
||||||
block.Get<ColorBlockWidget>("PING_COLOR").GetColor = () => GetPingColor(c);
|
block.Get<ColorBlockWidget>("LATENCY_COLOR").GetColor = () => LatencyColor(c.Latency);
|
||||||
|
|
||||||
|
var tooltip = parent.Get<ClientTooltipRegionWidget>("CLIENT_REGION");
|
||||||
|
tooltip.IsVisible = () => visible;
|
||||||
|
tooltip.Bind(orderManager, c.Index);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetupEditableNameWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager)
|
public static void SetupEditableNameWidget(Widget parent, Session.Slot s, Session.Client c, OrderManager orderManager)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using System.Linq;
|
|||||||
using OpenRA.Widgets;
|
using OpenRA.Widgets;
|
||||||
using OpenRA.Network;
|
using OpenRA.Network;
|
||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Widgets.Logic
|
namespace OpenRA.Mods.RA.Widgets.Logic
|
||||||
{
|
{
|
||||||
public class SpawnSelectorTooltipLogic
|
public class SpawnSelectorTooltipLogic
|
||||||
{
|
{
|
||||||
@@ -25,9 +25,14 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
var label = widget.Get<LabelWidget>("LABEL");
|
var label = widget.Get<LabelWidget>("LABEL");
|
||||||
var flag = widget.Get<ImageWidget>("FLAG");
|
var flag = widget.Get<ImageWidget>("FLAG");
|
||||||
var team = widget.Get<LabelWidget>("TEAM");
|
var team = widget.Get<LabelWidget>("TEAM");
|
||||||
|
var singleHeight = widget.Get("SINGLE_HEIGHT").Bounds.Height;
|
||||||
|
var doubleHeight = widget.Get("DOUBLE_HEIGHT").Bounds.Height;
|
||||||
var ownerFont = Game.Renderer.Fonts[label.Font];
|
var ownerFont = Game.Renderer.Fonts[label.Font];
|
||||||
var teamFont = Game.Renderer.Fonts[team.Font];
|
var teamFont = Game.Renderer.Fonts[team.Font];
|
||||||
|
|
||||||
|
// Width specified in YAML is used as the margin between flag / label and label / border
|
||||||
|
var labelMargin = widget.Bounds.Width;
|
||||||
|
|
||||||
var cachedWidth = 0;
|
var cachedWidth = 0;
|
||||||
var labelText = "";
|
var labelText = "";
|
||||||
string playerCountry = null;
|
string playerCountry = null;
|
||||||
@@ -43,18 +48,18 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
labelText = "Available spawn";
|
labelText = "Available spawn";
|
||||||
playerCountry = null;
|
playerCountry = null;
|
||||||
playerTeam = 0;
|
playerTeam = 0;
|
||||||
widget.Bounds.Height = 25;
|
widget.Bounds.Height = singleHeight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
labelText = client.Name;
|
labelText = client.Name;
|
||||||
playerCountry = client.Country;
|
playerCountry = client.Country;
|
||||||
playerTeam = client.Team;
|
playerTeam = client.Team;
|
||||||
widget.Bounds.Height = playerTeam > 0 ? 40 : 25;
|
widget.Bounds.Height = playerTeam > 0 ? doubleHeight : singleHeight;
|
||||||
teamWidth = teamFont.Measure(team.GetText()).X;
|
teamWidth = teamFont.Measure(team.GetText()).X;
|
||||||
}
|
}
|
||||||
|
|
||||||
label.Bounds.X = playerCountry != null ? flag.Bounds.Right + 5 : 5;
|
label.Bounds.X = playerCountry != null ? flag.Bounds.Right + labelMargin : labelMargin;
|
||||||
|
|
||||||
var textWidth = ownerFont.Measure(labelText).X;
|
var textWidth = ownerFont.Measure(labelText).X;
|
||||||
if (textWidth != cachedWidth)
|
if (textWidth != cachedWidth)
|
||||||
@@ -63,7 +68,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
|||||||
widget.Bounds.Width = 2*label.Bounds.X + textWidth;
|
widget.Bounds.Width = 2*label.Bounds.X + textWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
widget.Bounds.Width = Math.Max(teamWidth + 10, label.Bounds.Right + 5);
|
widget.Bounds.Width = Math.Max(teamWidth + 2*labelMargin, label.Bounds.Right + labelMargin);
|
||||||
team.Bounds.Width = widget.Bounds.Width;
|
team.Bounds.Width = widget.Bounds.Width;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ Container@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Background@PING_BLOCK:
|
Background@LATENCY:
|
||||||
Background:button
|
Background:button
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
@@ -81,11 +81,16 @@ Container@SERVER_LOBBY:
|
|||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -161,7 +166,7 @@ Container@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Background@PING_BLOCK:
|
Background@LATENCY:
|
||||||
Background:button
|
Background:button
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
@@ -169,11 +174,16 @@ Container@SERVER_LOBBY:
|
|||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:185
|
Width:185
|
||||||
@@ -263,7 +273,7 @@ Container@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Background@PING_BLOCK:
|
Background@LATENCY:
|
||||||
Background:button
|
Background:button
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
@@ -271,11 +281,16 @@ Container@SERVER_LOBBY:
|
|||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -319,7 +334,7 @@ Container@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Background@PING_BLOCK:
|
Background@LATENCY:
|
||||||
Background:button
|
Background:button
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
@@ -327,11 +342,16 @@ Container@SERVER_LOBBY:
|
|||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:185
|
Width:185
|
||||||
@@ -480,7 +500,6 @@ Container@SERVER_LOBBY:
|
|||||||
Height:25
|
Height:25
|
||||||
Align:Right
|
Align:Right
|
||||||
Text:Chat:
|
Text:Chat:
|
||||||
TooltipContainer@TOOLTIP_CONTAINER:
|
|
||||||
Button@DISCONNECT_BUTTON:
|
Button@DISCONNECT_BUTTON:
|
||||||
X:0
|
X:0
|
||||||
Y:499
|
Y:499
|
||||||
@@ -505,3 +524,4 @@ Container@SERVER_LOBBY:
|
|||||||
Width:140
|
Width:140
|
||||||
Height:35
|
Height:35
|
||||||
Text:Start Game
|
Text:Start Game
|
||||||
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
@@ -103,8 +103,12 @@ Background@SUPPORT_POWER_TOOLTIP:
|
|||||||
Background@SPAWN_TOOLTIP:
|
Background@SPAWN_TOOLTIP:
|
||||||
Logic:SpawnSelectorTooltipLogic
|
Logic:SpawnSelectorTooltipLogic
|
||||||
Background:panel-black
|
Background:panel-black
|
||||||
Width:141
|
Width:5
|
||||||
Children:
|
Children:
|
||||||
|
Container@SINGLE_HEIGHT:
|
||||||
|
Height:26
|
||||||
|
Container@DOUBLE_HEIGHT:
|
||||||
|
Height:40
|
||||||
Label@LABEL:
|
Label@LABEL:
|
||||||
X:5
|
X:5
|
||||||
Height:23
|
Height:23
|
||||||
@@ -118,4 +122,28 @@ Background@SPAWN_TOOLTIP:
|
|||||||
Y:21
|
Y:21
|
||||||
Height:15
|
Height:15
|
||||||
Font:TinyBold
|
Font:TinyBold
|
||||||
Align:center
|
Align:center
|
||||||
|
|
||||||
|
Background@CLIENT_TOOLTIP:
|
||||||
|
Logic:ClientTooltipLogic
|
||||||
|
Background:panel-black
|
||||||
|
Height:35
|
||||||
|
Width:5
|
||||||
|
Children:
|
||||||
|
Label@ADMIN:
|
||||||
|
Y:2
|
||||||
|
Height:18
|
||||||
|
Font:Bold
|
||||||
|
Text:Game Admin
|
||||||
|
Align:Center
|
||||||
|
Label@IP:
|
||||||
|
Y:5
|
||||||
|
Width:5
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
|
Label@LATENCY:
|
||||||
|
Y:17
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Background@SERVER_LOBBY:
|
|||||||
Y:4
|
Y:4
|
||||||
Width:244
|
Width:244
|
||||||
Height:244
|
Height:244
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
ScrollPanel@PLAYERS:
|
ScrollPanel@PLAYERS:
|
||||||
X:20
|
X:20
|
||||||
Y:67
|
Y:67
|
||||||
@@ -53,18 +54,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -139,18 +145,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:130
|
Width:130
|
||||||
@@ -239,18 +250,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -301,18 +317,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:130
|
Width:130
|
||||||
@@ -493,4 +514,5 @@ Background@SERVER_LOBBY:
|
|||||||
Width:120
|
Width:120
|
||||||
Height:25
|
Height:25
|
||||||
Text:Start Game
|
Text:Start Game
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
47
mods/d2k/chrome/tooltips.yaml
Normal file
47
mods/d2k/chrome/tooltips.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
Background@SPAWN_TOOLTIP:
|
||||||
|
Logic:SpawnSelectorTooltipLogic
|
||||||
|
Background:dialog3
|
||||||
|
Width:7
|
||||||
|
Children:
|
||||||
|
Container@SINGLE_HEIGHT:
|
||||||
|
Height:31
|
||||||
|
Container@DOUBLE_HEIGHT:
|
||||||
|
Height:47
|
||||||
|
Label@LABEL:
|
||||||
|
Y:3
|
||||||
|
Height:23
|
||||||
|
Font:Bold
|
||||||
|
Image@FLAG:
|
||||||
|
X:5
|
||||||
|
Y:5
|
||||||
|
Width:23
|
||||||
|
Height:23
|
||||||
|
Label@TEAM:
|
||||||
|
Y:28
|
||||||
|
Height:15
|
||||||
|
Font:TinyBold
|
||||||
|
Align:center
|
||||||
|
|
||||||
|
Background@CLIENT_TOOLTIP:
|
||||||
|
Logic:ClientTooltipLogic
|
||||||
|
Background:dialog3
|
||||||
|
Height:39
|
||||||
|
Width:7
|
||||||
|
Children:
|
||||||
|
Label@ADMIN:
|
||||||
|
Y:4
|
||||||
|
Height:18
|
||||||
|
Font:Bold
|
||||||
|
Text:Game Admin
|
||||||
|
Align:Center
|
||||||
|
Label@IP:
|
||||||
|
Y:7
|
||||||
|
Width:5
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
|
Label@LATENCY:
|
||||||
|
Y:19
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
@@ -60,6 +60,7 @@ ChromeLayout:
|
|||||||
mods/ra/chrome/dropdowns.yaml
|
mods/ra/chrome/dropdowns.yaml
|
||||||
mods/ra/chrome/modchooser.yaml
|
mods/ra/chrome/modchooser.yaml
|
||||||
mods/ra/chrome/cheats.yaml
|
mods/ra/chrome/cheats.yaml
|
||||||
|
mods/d2k/chrome/tooltips.yaml
|
||||||
|
|
||||||
Weapons:
|
Weapons:
|
||||||
mods/d2k/weapons/defaults.yaml
|
mods/d2k/weapons/defaults.yaml
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Background@SERVER_LOBBY:
|
|||||||
Y:4
|
Y:4
|
||||||
Width:244
|
Width:244
|
||||||
Height:244
|
Height:244
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
ScrollPanel@PLAYERS:
|
ScrollPanel@PLAYERS:
|
||||||
X:20
|
X:20
|
||||||
Y:67
|
Y:67
|
||||||
@@ -53,18 +54,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -139,18 +145,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:130
|
Width:130
|
||||||
@@ -239,18 +250,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
TextField@NAME:
|
TextField@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
X:15
|
X:15
|
||||||
@@ -301,18 +317,23 @@ Background@SERVER_LOBBY:
|
|||||||
ImageName:admin
|
ImageName:admin
|
||||||
X:2
|
X:2
|
||||||
Visible:false
|
Visible:false
|
||||||
Container@PING_BLOCK:
|
Container@LATENCY:
|
||||||
X:0
|
X:0
|
||||||
Y:6
|
Y:6
|
||||||
Width:11
|
Width:11
|
||||||
Height:14
|
Height:14
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
ColorBlock@PING_COLOR:
|
ColorBlock@LATENCY_COLOR:
|
||||||
X:2
|
X:2
|
||||||
Y:2
|
Y:2
|
||||||
Width:PARENT_RIGHT-4
|
Width:PARENT_RIGHT-4
|
||||||
Height:PARENT_BOTTOM-4
|
Height:PARENT_BOTTOM-4
|
||||||
|
ClientTooltipRegion@CLIENT_REGION:
|
||||||
|
TooltipContainer:TOOLTIP_CONTAINER
|
||||||
|
Template:CLIENT_TOOLTIP
|
||||||
|
Width:11
|
||||||
|
Height:25
|
||||||
Label@NAME:
|
Label@NAME:
|
||||||
Text:Name
|
Text:Name
|
||||||
Width:130
|
Width:130
|
||||||
@@ -499,4 +520,5 @@ Background@SERVER_LOBBY:
|
|||||||
Width:120
|
Width:120
|
||||||
Height:25
|
Height:25
|
||||||
Text:Start Game
|
Text:Start Game
|
||||||
Font:Bold
|
Font:Bold
|
||||||
|
TooltipContainer@TOOLTIP_CONTAINER:
|
||||||
47
mods/ra/chrome/tooltips.yaml
Normal file
47
mods/ra/chrome/tooltips.yaml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
Background@SPAWN_TOOLTIP:
|
||||||
|
Logic:SpawnSelectorTooltipLogic
|
||||||
|
Background:dialog4
|
||||||
|
Width:7
|
||||||
|
Children:
|
||||||
|
Container@SINGLE_HEIGHT:
|
||||||
|
Height:29
|
||||||
|
Container@DOUBLE_HEIGHT:
|
||||||
|
Height:44
|
||||||
|
Label@LABEL:
|
||||||
|
Y:2
|
||||||
|
Height:23
|
||||||
|
Font:Bold
|
||||||
|
Image@FLAG:
|
||||||
|
X:7
|
||||||
|
Y:7
|
||||||
|
Width:32
|
||||||
|
Height:16
|
||||||
|
Label@TEAM:
|
||||||
|
Y:23
|
||||||
|
Height:15
|
||||||
|
Font:TinyBold
|
||||||
|
Align:center
|
||||||
|
|
||||||
|
Background@CLIENT_TOOLTIP:
|
||||||
|
Logic:ClientTooltipLogic
|
||||||
|
Background:dialog4
|
||||||
|
Height:39
|
||||||
|
Width:7
|
||||||
|
Children:
|
||||||
|
Label@ADMIN:
|
||||||
|
Y:4
|
||||||
|
Height:18
|
||||||
|
Font:Bold
|
||||||
|
Text:Game Admin
|
||||||
|
Align:Center
|
||||||
|
Label@IP:
|
||||||
|
Y:7
|
||||||
|
Width:5
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
|
Label@LATENCY:
|
||||||
|
Y:19
|
||||||
|
Height:10
|
||||||
|
Font:TinyBold
|
||||||
|
Align:Center
|
||||||
@@ -70,6 +70,7 @@ ChromeLayout:
|
|||||||
mods/ra/chrome/modchooser.yaml
|
mods/ra/chrome/modchooser.yaml
|
||||||
mods/ra/chrome/cheats.yaml
|
mods/ra/chrome/cheats.yaml
|
||||||
mods/ra/chrome/objectives.yaml
|
mods/ra/chrome/objectives.yaml
|
||||||
|
mods/ra/chrome/tooltips.yaml
|
||||||
|
|
||||||
Weapons:
|
Weapons:
|
||||||
mods/ra/weapons.yaml
|
mods/ra/weapons.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user