Add registered player tooltip to lobby chat names.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
efe7bce08a
commit
ef5541cce4
@@ -659,8 +659,24 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
switch (notification.Pool)
|
switch (notification.Pool)
|
||||||
{
|
{
|
||||||
case TextNotificationPool.Chat:
|
case TextNotificationPool.Chat:
|
||||||
|
{
|
||||||
|
var profileTooltip = chatLine.GetOrNull<ClientTooltipRegionWidget>("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);
|
Game.Sound.PlayNotification(modRules, null, "Sounds", chatLineSound, null);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case TextNotificationPool.System:
|
case TextNotificationPool.System:
|
||||||
Game.Sound.PlayNotification(modRules, null, "Sounds", lobbyOptionChangedSound, null);
|
Game.Sound.PlayNotification(modRules, null, "Sounds", lobbyOptionChangedSound, null);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ Container@CHAT_LINE_TEMPLATE:
|
|||||||
X: 5
|
X: 5
|
||||||
Height: 16
|
Height: 16
|
||||||
Shadow: True
|
Shadow: True
|
||||||
|
ClientTooltipRegion@PROFILE_TOOLTIP:
|
||||||
|
Visible: false
|
||||||
|
TooltipContainer: TOOLTIP_CONTAINER
|
||||||
|
Template: ANONYMOUS_PLAYER_TOOLTIP
|
||||||
Label@TEXT:
|
Label@TEXT:
|
||||||
X: 5
|
X: 5
|
||||||
Height: 16
|
Height: 16
|
||||||
|
|||||||
Reference in New Issue
Block a user