diff --git a/osu.Game/Online/Chat/ChatLinkSpriteText.cs b/osu.Game/Online/Chat/ChatLink.cs similarity index 80% rename from osu.Game/Online/Chat/ChatLinkSpriteText.cs rename to osu.Game/Online/Chat/ChatLink.cs index adbdd9ed0c..e375ace1a0 100644 --- a/osu.Game/Online/Chat/ChatLinkSpriteText.cs +++ b/osu.Game/Online/Chat/ChatLink.cs @@ -12,7 +12,7 @@ using System.Linq; namespace osu.Game.Online.Chat { - public class ChatLinkSpriteText : OsuLinkSpriteText + public class ChatLink : OsuLinkSpriteText { public int LinkId = -1; @@ -22,12 +22,12 @@ namespace osu.Game.Online.Chat 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 - var otherSpritesWithSameLink = ((Container)Parent).Children.Where(child => (child as ChatLinkSpriteText)?.LinkId == LinkId && !Equals(child)); + var otherSpritesWithSameLink = ((Container)Parent).Children.Where(child => (child as ChatLink)?.LinkId == LinkId && !Equals(child)); var hoverResult = base.OnHover(state); if (!otherSpritesWithSameLink.Any(sprite => sprite.IsHovered)) - foreach (ChatLinkSpriteText sprite in otherSpritesWithSameLink) + foreach (ChatLink sprite in otherSpritesWithSameLink) sprite.TriggerOnHover(state); Content.FadeColour(hoverColour, 500, Easing.OutQuint); @@ -37,7 +37,7 @@ namespace osu.Game.Online.Chat protected override void OnHoverLost(InputState state) { - var spritesWithSameLink = ((Container)Parent).Children.Where(child => (child as ChatLinkSpriteText)?.LinkId == LinkId); + var spritesWithSameLink = ((Container)Parent).Children.Where(child => (child as ChatLink)?.LinkId == LinkId); if (spritesWithSameLink.Any(sprite => sprite.IsHovered)) { @@ -46,7 +46,7 @@ namespace osu.Game.Online.Chat return; } - foreach (ChatLinkSpriteText sprite in spritesWithSameLink) + foreach (ChatLink sprite in spritesWithSameLink) sprite.Content.FadeColour(urlColour, 500, Easing.OutQuint); base.OnHoverLost(state); diff --git a/osu.Game/Overlays/Chat/ChatLine.cs b/osu.Game/Overlays/Chat/ChatLine.cs index ba88a9ac77..475a49b12e 100644 --- a/osu.Game/Overlays/Chat/ChatLine.cs +++ b/osu.Game/Overlays/Chat/ChatLine.cs @@ -83,7 +83,7 @@ namespace osu.Game.Overlays.Chat private Message message; private OsuSpriteText username; - private OsuLinkTextFlowContainer contentFlow; + private OsuLinkTextFlowContainer contentFlow; public Message Message { @@ -189,7 +189,7 @@ namespace osu.Game.Overlays.Chat Padding = new MarginPadding { Left = message_padding + padding }, Children = new Drawable[] { - contentFlow = new OsuLinkTextFlowContainer(t => { t.TextSize = text_size; }) + contentFlow = new OsuLinkTextFlowContainer(t => { t.TextSize = text_size; }) { AutoSizeAxes = Axes.Y, RelativeSizeAxes = Axes.X, @@ -238,7 +238,7 @@ namespace osu.Game.Overlays.Chat sprite.Font = @"Exo2.0-MediumItalic"; // We want to use something that is unique to every formatted link PER MESSAGE - ((ChatLinkSpriteText)sprite).LinkId = link.Index; + ((ChatLink)sprite).LinkId = link.Index; }); } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 24ca01a3ad..d1941fb046 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -289,7 +289,7 @@ - +