diff --git a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs index 21b62ee37e..cc40ac2214 100644 --- a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs +++ b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs @@ -13,18 +13,12 @@ namespace osu.Game.Graphics.Sprites { public class OsuLinkSpriteText : OsuSpriteText { - private readonly OsuClickableContainer content; - - public override bool HandleInput => content.Action != null; - - protected override Container Content => content ?? (Container)this; - protected override IEnumerable FlowingChildren => Children; protected override bool OnClick(InputState state) { OnLinkClicked(); - return true; + return base.OnClick(state); } private string url; @@ -42,14 +36,6 @@ namespace osu.Game.Graphics.Sprites } } - public OsuLinkSpriteText() - { - AddInternal(content = new OsuClickableContainer - { - AutoSizeAxes = Axes.Both, - }); - } - public ColourInfo TextColour { get { return Content.Colour; } diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index 3954330d33..7bdd09e2e0 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -17,6 +17,7 @@ using osu.Game.Graphics.Containers; using osu.Game.Graphics.Sprites; using osu.Game.Users; using osu.Framework.Graphics.Cursor; +using osu.Framework.Input; namespace osu.Game.Overlays.Profile { @@ -490,8 +491,20 @@ namespace osu.Game.Overlays.Profile { public string TooltipText => "View Profile in Browser"; + private readonly OsuHoverContainer content; + + protected override Container Content => content ?? (Container)this; + + public override bool HandleInput => true; + public ProfileLink(User user) { + AddInternal(content = new OsuHoverContainer + { + Action = OnLinkClicked, + AutoSizeAxes = Axes.Both, + }); + Text = user.Username; Url = $@"https://osu.ppy.sh/users/{user.Id}"; Font = @"Exo2.0-RegularItalic";