diff --git a/osu.Game/Online/Chat/ChatLink.cs b/osu.Game/Online/Chat/ChatLink.cs index e375ace1a0..9fb557492c 100644 --- a/osu.Game/Online/Chat/ChatLink.cs +++ b/osu.Game/Online/Chat/ChatLink.cs @@ -5,6 +5,7 @@ using OpenTK.Graphics; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Cursor; using osu.Framework.Input; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; @@ -12,13 +13,15 @@ using System.Linq; namespace osu.Game.Online.Chat { - public class ChatLink : OsuLinkSpriteText + public class ChatLink : OsuLinkSpriteText, IHasTooltip { public int LinkId = -1; private Color4 hoverColour; private Color4 urlColour; + public string TooltipText => LinkId != -1 ? Url : null; + protected override bool OnHover(InputState state) { // Every word is one sprite in chat (for word wrap) so we need to find all other sprites that display the same link