diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 6c169d691f..6d58ea7ffe 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -659,8 +659,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic switch (notification.Pool) { case TextNotificationPool.Chat: + { + var profileTooltip = chatLine.GetOrNull("PROFILE_TOOLTIP"); + var prefix = chatLine.GetOrNull("PREFIX"); + var c = orderManager.LobbyInfo.ClientWithIndex(notification.ClientId); + if (profileTooltip != null && prefix != null && c != null) + { + profileTooltip.Bounds = prefix.Bounds; + if (c.Fingerprint != null) + profileTooltip.Template = "REGISTERED_PLAYER_TOOLTIP"; + + profileTooltip.IsVisible = () => true; + profileTooltip.Bind(orderManager, worldRenderer, c); + } + Game.Sound.PlayNotification(modRules, null, "Sounds", chatLineSound, null); break; + } + case TextNotificationPool.System: Game.Sound.PlayNotification(modRules, null, "Sounds", lobbyOptionChangedSound, null); break; diff --git a/mods/common/chrome/text-notifications.yaml b/mods/common/chrome/text-notifications.yaml index dc466afe03..34ef9ffc03 100644 --- a/mods/common/chrome/text-notifications.yaml +++ b/mods/common/chrome/text-notifications.yaml @@ -11,6 +11,10 @@ Container@CHAT_LINE_TEMPLATE: X: 5 Height: 16 Shadow: True + ClientTooltipRegion@PROFILE_TOOLTIP: + Visible: false + TooltipContainer: TOOLTIP_CONTAINER + Template: ANONYMOUS_PLAYER_TOOLTIP Label@TEXT: X: 5 Height: 16