From fc0b97065cd4d8e8e13460d55e67805ecec7e69e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 20 Dec 2017 15:54:13 +0900 Subject: [PATCH] Move hover sound/container to base implementation --- osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs | 11 +++++++++++ osu.Game/Overlays/Profile/ProfileHeader.cs | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs index e76b1781c4..897df39d0c 100644 --- a/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs +++ b/osu.Game/Graphics/Sprites/OsuLinkSpriteText.cs @@ -6,6 +6,8 @@ using osu.Framework.Graphics.Colour; using osu.Framework.Input; using System.Collections.Generic; using System.Diagnostics; +using osu.Framework.Graphics.Containers; +using osu.Game.Graphics.Containers; namespace osu.Game.Graphics.Sprites { @@ -13,6 +15,15 @@ namespace osu.Game.Graphics.Sprites { protected override IEnumerable FlowingChildren => Children; + protected override Container Content => content; + + private readonly Container content; + + public OsuLinkSpriteText() + { + AddInternal(content = new OsuHoverContainer { AutoSizeAxes = Axes.Both }); + } + protected override bool OnClick(InputState state) { OnLinkClicked(); diff --git a/osu.Game/Overlays/Profile/ProfileHeader.cs b/osu.Game/Overlays/Profile/ProfileHeader.cs index dcf7d844a2..aa3e6ea90c 100644 --- a/osu.Game/Overlays/Profile/ProfileHeader.cs +++ b/osu.Game/Overlays/Profile/ProfileHeader.cs @@ -490,16 +490,10 @@ namespace osu.Game.Overlays.Profile { public string TooltipText => "View Profile in Browser"; - private readonly OsuHoverContainer content; - - protected override Container Content => content; - public override bool HandleInput => true; public ProfileLink(User user) { - AddInternal(content = new OsuHoverContainer { AutoSizeAxes = Axes.Both }); - Text = user.Username; Url = $@"https://osu.ppy.sh/users/{user.Id}"; Font = @"Exo2.0-RegularItalic";