diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 4abe991205..b3bf2386c7 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -494,21 +494,41 @@ public LinkFlowContainer(Action defaultCreationParameters = null) : { } - protected override SpriteText CreateSpriteText() => new SpriteLink(); + protected override SpriteText CreateSpriteText() => new LinkText(); - public void AddLink(string text, string url) => AddText(text, link => ((SpriteLink)link).Url = url); + public void AddLink(string text, string url) => AddText(text, link => ((LinkText)link).Url = url); - private class SpriteLink : OsuSpriteText + private class LinkText : OsuSpriteText { public override bool HandleInput => Url != null; public string Url; + private Color4 hoverColour; + + protected override bool OnHover(InputState state) + { + FadeColour(hoverColour, 500, EasingTypes.OutQuint); + return base.OnHover(state); + } + + protected override void OnHoverLost(InputState state) + { + FadeColour(Color4.White, 500, EasingTypes.OutQuint); + base.OnHoverLost(state); + } + protected override bool OnClick(InputState state) { Process.Start(Url); return true; } + + [BackgroundDependencyLoader] + private void load(OsuColour colours) + { + hoverColour = colours.Yellow; + } } } }