diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index 3d44d2ea6b..f539c40362 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -656,7 +656,7 @@ - + diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs index 67bbfbba3b..7865fa2078 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/GameInfoStatsLogic.cs @@ -87,7 +87,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic var pp = p.First; var client = world.LobbyInfo.ClientWithIndex(pp.ClientIndex); var item = playerTemplate.Clone(); - LobbyUtils.SetupClientWidget(item, client, orderManager, client != null && client.Bot == null); var nameLabel = item.Get("NAME"); var nameFont = Game.Renderer.Fonts[nameLabel.Font]; @@ -137,7 +136,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic foreach (var client in spectators) { var item = playerTemplate.Clone(); - LobbyUtils.SetupClientWidget(item, client, orderManager, client != null && client.Bot == null); var nameLabel = item.Get("NAME"); var nameFont = Game.Renderer.Fonts[nameLabel.Font]; diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/ClientTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/ClientTooltipLogic.cs deleted file mode 100644 index effd21e336..0000000000 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/ClientTooltipLogic.cs +++ /dev/null @@ -1,107 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2018 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, either version 3 of - * the License, or (at your option) any later version. For more - * information, see COPYING. - */ -#endregion - -using System; -using OpenRA.Graphics; -using OpenRA.Network; -using OpenRA.Widgets; - -namespace OpenRA.Mods.Common.Widgets.Logic -{ - public class ClientTooltipLogic : ChromeLogic - { - SpriteFont latencyFont; - SpriteFont latencyPrefixFont; - - [ObjectCreator.UseCtor] - public ClientTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, OrderManager orderManager, int clientIndex) - { - var admin = widget.Get("ADMIN"); - var adminFont = Game.Renderer.Fonts[admin.Font]; - - var latency = widget.GetOrNull("LATENCY"); - if (latency != null) - latencyFont = Game.Renderer.Fonts[latency.Font]; - - var latencyPrefix = widget.GetOrNull("LATENCY_PREFIX"); - if (latencyPrefix != null) - latencyPrefixFont = Game.Renderer.Fonts[latencyPrefix.Font]; - - var ip = widget.Get("IP"); - var addressFont = Game.Renderer.Fonts[ip.Font]; - - var location = widget.Get("LOCATION"); - var locationFont = Game.Renderer.Fonts[location.Font]; - - var locationOffset = location.Bounds.Y; - var addressOffset = ip.Bounds.Y; - var latencyOffset = latency == null ? 0 : latency.Bounds.Y; - var tooltipHeight = widget.Bounds.Height; - - var margin = widget.Bounds.Width; - - widget.IsVisible = () => (orderManager.LobbyInfo.ClientWithIndex(clientIndex) != null); - tooltipContainer.BeforeRender = () => - { - if (!widget.IsVisible()) - return; - - var latencyPrefixSize = latencyPrefix == null ? 0 : latencyPrefix.Bounds.X + latencyPrefixFont.Measure(latencyPrefix.GetText() + " ").X; - var locationWidth = locationFont.Measure(location.GetText()).X; - var adminWidth = adminFont.Measure(admin.GetText()).X; - var addressWidth = addressFont.Measure(ip.GetText()).X; - var latencyWidth = latencyFont == null ? 0 : latencyPrefixSize + latencyFont.Measure(latency.GetText()).X; - var width = Math.Max(locationWidth, Math.Max(adminWidth, Math.Max(addressWidth, latencyWidth))); - widget.Bounds.Width = width + 2 * margin; - if (latency != null) - latency.Bounds.Width = widget.Bounds.Width; - ip.Bounds.Width = widget.Bounds.Width; - admin.Bounds.Width = widget.Bounds.Width; - location.Bounds.Width = widget.Bounds.Width; - - ip.Bounds.Y = addressOffset; - if (latency != null) - latency.Bounds.Y = latencyOffset; - location.Bounds.Y = locationOffset; - widget.Bounds.Height = tooltipHeight; - - if (admin.IsVisible()) - { - ip.Bounds.Y += admin.Bounds.Height; - if (latency != null) - latency.Bounds.Y += admin.Bounds.Height; - location.Bounds.Y += admin.Bounds.Height; - widget.Bounds.Height += admin.Bounds.Height; - } - - if (latencyPrefix != null) - latencyPrefix.Bounds.Y = latency.Bounds.Y; - if (latency != null) - latency.Bounds.X = latencyPrefixSize; - }; - - admin.IsVisible = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex).IsAdmin; - var client = orderManager.LobbyInfo.ClientWithIndex(clientIndex); - var ping = orderManager.LobbyInfo.PingFromClient(client); - if (latency != null) - { - latency.GetText = () => LobbyUtils.LatencyDescription(ping); - latency.GetColor = () => LobbyUtils.LatencyColor(ping); - } - - var address = LobbyUtils.GetExternalIP(clientIndex, orderManager); - var cachedDescriptiveIP = LobbyUtils.DescriptiveIpAddress(address); - ip.GetText = () => cachedDescriptiveIP; - var cachedCountryLookup = GeoIP.LookupCountry(address); - location.GetText = () => cachedCountryLookup; - } - } -} diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LatencyTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LatencyTooltipLogic.cs new file mode 100644 index 0000000000..c2a2118507 --- /dev/null +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LatencyTooltipLogic.cs @@ -0,0 +1,45 @@ +#region Copyright & License Information +/* + * Copyright 2007-2018 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, either version 3 of + * the License, or (at your option) any later version. For more + * information, see COPYING. + */ +#endregion + +using System; +using OpenRA.Graphics; +using OpenRA.Network; +using OpenRA.Widgets; + +namespace OpenRA.Mods.Common.Widgets.Logic +{ + public class LatencyTooltipLogic : ChromeLogic + { + [ObjectCreator.UseCtor] + public LatencyTooltipLogic(Widget widget, TooltipContainerWidget tooltipContainer, OrderManager orderManager, int clientIndex) + { + var latencyPrefix = widget.Get("LATENCY_PREFIX"); + var latencyPrefixFont = Game.Renderer.Fonts[latencyPrefix.Font]; + var latency = widget.Get("LATENCY"); + var latencyFont = Game.Renderer.Fonts[latency.Font]; + var rightMargin = widget.Bounds.Width; + + latency.Bounds.X = latencyPrefix.Bounds.X + latencyPrefixFont.Measure(latencyPrefix.Text + " ").X; + + widget.IsVisible = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex) != null; + tooltipContainer.BeforeRender = () => + { + if (widget.IsVisible()) + widget.Bounds.Width = latency.Bounds.X + latencyFont.Measure(latency.GetText()).X + rightMargin; + }; + + var client = orderManager.LobbyInfo.ClientWithIndex(clientIndex); + var ping = orderManager.LobbyInfo.PingFromClient(client); + latency.GetText = () => LobbyUtils.LatencyDescription(ping); + latency.GetColor = () => LobbyUtils.LatencyColor(ping); + } + } +} diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 77872490f7..b54342082c 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -574,7 +574,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (template == null || template.Id != editablePlayerTemplate.Id) template = editablePlayerTemplate.Clone(); - LobbyUtils.SetupClientWidget(template, client, orderManager, client.Bot == null); + LobbyUtils.SetupLatencyWidget(template, client, orderManager, client.Bot == null); if (client.Bot != null) LobbyUtils.SetupEditableSlotWidget(template, slot, client, orderManager, map); @@ -593,7 +593,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (template == null || template.Id != nonEditablePlayerTemplate.Id) template = nonEditablePlayerTemplate.Clone(); - LobbyUtils.SetupClientWidget(template, client, orderManager, client.Bot == null); + LobbyUtils.SetupLatencyWidget(template, client, orderManager, client.Bot == null); LobbyUtils.SetupColorWidget(template, slot, client); LobbyUtils.SetupFactionWidget(template, slot, client, factions); @@ -661,7 +661,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic LobbyUtils.SetupReadyWidget(template, null, client); } - LobbyUtils.SetupClientWidget(template, c, orderManager, true); + LobbyUtils.SetupLatencyWidget(template, c, orderManager, true); template.IsVisible = () => true; if (idx >= players.Children.Count) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs index e90cade660..d32c16a0a7 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyUtils.cs @@ -305,12 +305,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic return ip; } - public static void SetupClientWidget(Widget parent, Session.Client c, OrderManager orderManager, bool visible) + public static void SetupLatencyWidget(Widget parent, Session.Client c, OrderManager orderManager, bool visible) { - var adminIndicator = parent.GetOrNull("ADMIN_INDICATOR"); - if (adminIndicator != null) - adminIndicator.IsVisible = () => c != null && c.IsAdmin; - var block = parent.GetOrNull("LATENCY"); if (block != null) { @@ -321,7 +317,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic orderManager.LobbyInfo.PingFromClient(c)); } - var tooltip = parent.Get("CLIENT_REGION"); + var tooltip = parent.Get("LATENCY_REGION"); tooltip.IsVisible = () => c != null && visible; if (c != null) tooltip.Bind(orderManager, c.Index); diff --git a/mods/cnc/chrome/ingame-infostats.yaml b/mods/cnc/chrome/ingame-infostats.yaml index b9a6eaf83c..e664816e44 100644 --- a/mods/cnc/chrome/ingame-infostats.yaml +++ b/mods/cnc/chrome/ingame-infostats.yaml @@ -88,12 +88,6 @@ Container@SKIRMISH_STATS: Width: 210 Height: 25 Shadow: True - ClientTooltipRegion@CLIENT_REGION: - TooltipContainer: TOOLTIP_CONTAINER - Template: INGAME_CLIENT_TOOLTIP - X: 10 - Width: 210 - Height: 25 Image@FACTIONFLAG: X: 230 Y: 6 diff --git a/mods/cnc/chrome/lobby-players.yaml b/mods/cnc/chrome/lobby-players.yaml index 3f42ef6765..08a8b37ed4 100644 --- a/mods/cnc/chrome/lobby-players.yaml +++ b/mods/cnc/chrome/lobby-players.yaml @@ -61,11 +61,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - ImageCollection: lobby-bits - ImageName: admin - X: 2 - Visible: false Background@LATENCY: Y: 6 Width: 11 @@ -78,11 +73,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 190 @@ -158,11 +153,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Background@LATENCY: Y: 6 Width: 11 @@ -175,11 +165,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: X: 20 Y: 0 - 1 @@ -273,11 +263,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Background@LATENCY: Y: 6 Width: 11 @@ -290,11 +275,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 190 @@ -328,11 +313,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Background@LATENCY: Y: 6 Width: 11 @@ -345,11 +325,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: X: 20 Y: 0 - 1 diff --git a/mods/cnc/chrome/tooltips.yaml b/mods/cnc/chrome/tooltips.yaml index bf4c08aaa8..3ce95543c8 100644 --- a/mods/cnc/chrome/tooltips.yaml +++ b/mods/cnc/chrome/tooltips.yaml @@ -188,60 +188,17 @@ Background@SPAWN_TOOLTIP: Font: TinyBold Align: center -Background@CLIENT_TOOLTIP: - Logic: ClientTooltipLogic +Background@LATENCY_TOOLTIP: + Logic: LatencyTooltipLogic Background: panel-black - Height: 47 + Height: 26 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@LOCATION: - Y: 17 - Height: 10 - Font: TinyBold - Align: Center Label@LATENCY_PREFIX: - X: 10 - Y: 29 - Height: 10 - Font: TinyBold + X: 5 + Height: 23 + Font: Bold Text: Latency: Label@LATENCY: - Y: 29 - Height: 10 - Font: TinyBold - -Background@INGAME_CLIENT_TOOLTIP: - Logic: ClientTooltipLogic - Background: panel-black - Height: 35 - Width: 5 - Children: - Label@ADMIN: - Y: 2 - Height: 18 + Height: 23 Font: Bold - Text: Game Admin - Align: Center - Label@IP: - Y: 5 - Width: 5 - Height: 10 - Font: TinyBold - Align: Center - Label@LOCATION: - Y: 17 - Height: 10 - Font: TinyBold - Align: Center diff --git a/mods/common/chrome/ingame-infostats.yaml b/mods/common/chrome/ingame-infostats.yaml index 6b5f803885..61e8b524bd 100644 --- a/mods/common/chrome/ingame-infostats.yaml +++ b/mods/common/chrome/ingame-infostats.yaml @@ -89,12 +89,6 @@ Container@SKIRMISH_STATS: Width: 210 Height: 25 Shadow: True - ClientTooltipRegion@CLIENT_REGION: - TooltipContainer: TOOLTIP_CONTAINER - Template: INGAME_CLIENT_TOOLTIP - X: 10 - Width: 210 - Height: 25 Image@FACTIONFLAG: X: 230 Y: 6 diff --git a/mods/common/chrome/lobby-players.yaml b/mods/common/chrome/lobby-players.yaml index a191749c7c..492ca826b3 100644 --- a/mods/common/chrome/lobby-players.yaml +++ b/mods/common/chrome/lobby-players.yaml @@ -61,11 +61,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -77,11 +72,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 165 @@ -154,11 +149,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -170,11 +160,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: X: 20 Y: 0 - 1 @@ -266,11 +256,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -282,11 +267,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 165 @@ -320,11 +305,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -336,11 +316,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: Width: 160 Height: 25 diff --git a/mods/common/chrome/tooltips.yaml b/mods/common/chrome/tooltips.yaml index f36ee74561..799426707d 100644 --- a/mods/common/chrome/tooltips.yaml +++ b/mods/common/chrome/tooltips.yaml @@ -113,63 +113,22 @@ Background@SPAWN_TOOLTIP: Font: TinyBold Align: center -Background@CLIENT_TOOLTIP: - Logic: ClientTooltipLogic +Background@LATENCY_TOOLTIP: + Logic: LatencyTooltipLogic Background: dialog4 - Height: 51 + Height: 29 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@LOCATION: - Y: 19 - Height: 10 - Font: TinyBold - Align: Center Label@LATENCY_PREFIX: - X: 10 - Y: 31 - Height: 10 - Font: TinyBold + X: 7 + Y: 2 + Height: 23 + Font: Bold Text: Latency: Label@LATENCY: - Y: 31 - Height: 10 - Font: TinyBold - -Background@INGAME_CLIENT_TOOLTIP: - Logic: ClientTooltipLogic - Background: dialog4 - Height: 41 - Width: 7 - Children: - Label@ADMIN: - Y: 4 - Height: 18 + Y: 2 + Height: 23 Font: Bold - Text: Game Admin - Align: Center - Label@IP: - Y: 7 - Width: 5 - Height: 10 - Font: TinyBold - Align: Center - Label@LOCATION: - Y: 19 - Height: 10 - Font: TinyBold - Align: Center Background@PRODUCTION_TOOLTIP: Logic: ProductionTooltipLogic diff --git a/mods/d2k/chrome/ingame-infostats.yaml b/mods/d2k/chrome/ingame-infostats.yaml index 6b5f803885..61e8b524bd 100644 --- a/mods/d2k/chrome/ingame-infostats.yaml +++ b/mods/d2k/chrome/ingame-infostats.yaml @@ -89,12 +89,6 @@ Container@SKIRMISH_STATS: Width: 210 Height: 25 Shadow: True - ClientTooltipRegion@CLIENT_REGION: - TooltipContainer: TOOLTIP_CONTAINER - Template: INGAME_CLIENT_TOOLTIP - X: 10 - Width: 210 - Height: 25 Image@FACTIONFLAG: X: 230 Y: 6 diff --git a/mods/d2k/chrome/lobby-players.yaml b/mods/d2k/chrome/lobby-players.yaml index ae973d75ae..3477ce4623 100644 --- a/mods/d2k/chrome/lobby-players.yaml +++ b/mods/d2k/chrome/lobby-players.yaml @@ -61,11 +61,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -77,11 +72,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 165 @@ -154,11 +149,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -170,11 +160,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: X: 20 Y: 0 - 1 @@ -266,11 +256,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -282,11 +267,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP TextField@NAME: X: 15 Width: 165 @@ -320,11 +305,6 @@ Container@LOBBY_PLAYER_BIN: Height: 25 Visible: false Children: - Image@ADMIN_INDICATOR: - X: 2 - ImageCollection: lobby-bits - ImageName: admin - Visible: false Container@LATENCY: Y: 6 Width: 11 @@ -336,11 +316,11 @@ Container@LOBBY_PLAYER_BIN: Y: 2 Width: PARENT_RIGHT - 4 Height: PARENT_BOTTOM - 4 - ClientTooltipRegion@CLIENT_REGION: + ClientTooltipRegion@LATENCY_REGION: Width: 11 Height: 25 TooltipContainer: TOOLTIP_CONTAINER - Template: CLIENT_TOOLTIP + Template: LATENCY_TOOLTIP Label@NAME: X: 20 Y: 0 - 1 diff --git a/mods/d2k/chrome/tooltips.yaml b/mods/d2k/chrome/tooltips.yaml index b3bc525509..e17ad321bd 100644 --- a/mods/d2k/chrome/tooltips.yaml +++ b/mods/d2k/chrome/tooltips.yaml @@ -113,63 +113,22 @@ Background@SPAWN_TOOLTIP: Font: TinyBold Align: center -Background@CLIENT_TOOLTIP: - Logic: ClientTooltipLogic +Background@LATENCY_TOOLTIP: + Logic: LatencyTooltipLogic Background: dialog3 - Height: 51 + Height: 31 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@LOCATION: - Y: 19 - Height: 10 - Font: TinyBold - Align: Center Label@LATENCY_PREFIX: - X: 10 - Y: 31 - Height: 10 - Font: TinyBold + X: 7 + Y: 3 + Height: 23 + Font: Bold Text: Latency: Label@LATENCY: - Y: 31 - Height: 10 - Font: TinyBold - -Background@INGAME_CLIENT_TOOLTIP: - Logic: ClientTooltipLogic - Background: dialog3 - Height: 41 - Width: 7 - Children: - Label@ADMIN: - Y: 4 - Height: 18 + Y: 3 + Height: 23 Font: Bold - Text: Game Admin - Align: Center - Label@IP: - Y: 7 - Width: 5 - Height: 10 - Font: TinyBold - Align: Center - Label@LOCATION: - Y: 19 - Height: 10 - Font: TinyBold - Align: Center Background@PRODUCTION_TOOLTIP: Logic: ProductionTooltipLogic