diff --git a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtra.cs b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtra.cs index 32da23b27d3a..58c1ebee0f7f 100644 --- a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtra.cs +++ b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardExtra.cs @@ -252,7 +252,7 @@ private void load(BeatmapSetOverlay? beatmapSetOverlay) if (BeatmapSet.FeaturedInSpotlight) { - titleBadgeArea.Add(new SpotlightBeatmapPill + titleBadgeArea.Add(new SpotlightBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, @@ -262,7 +262,7 @@ private void load(BeatmapSetOverlay? beatmapSetOverlay) if (BeatmapSet.HasExplicitContent) { - titleBadgeArea.Add(new ExplicitContentBeatmapPill + titleBadgeArea.Add(new ExplicitContentBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, @@ -272,7 +272,7 @@ private void load(BeatmapSetOverlay? beatmapSetOverlay) if (BeatmapSet.TrackId != null) { - artistContainer.Content[0][1] = new FeaturedArtistBeatmapPill + artistContainer.Content[0][1] = new FeaturedArtistBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, diff --git a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardNormal.cs b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardNormal.cs index fc91c91e3cda..3d7e81de2153 100644 --- a/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardNormal.cs +++ b/osu.Game/Beatmaps/Drawables/Cards/BeatmapCardNormal.cs @@ -233,7 +233,7 @@ private void load() if (BeatmapSet.FeaturedInSpotlight) { - titleBadgeArea.Add(new SpotlightBeatmapPill + titleBadgeArea.Add(new SpotlightBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, @@ -243,7 +243,7 @@ private void load() if (BeatmapSet.HasExplicitContent) { - titleBadgeArea.Add(new ExplicitContentBeatmapPill + titleBadgeArea.Add(new ExplicitContentBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, @@ -253,7 +253,7 @@ private void load() if (BeatmapSet.TrackId != null) { - artistContainer.Content[0][1] = new FeaturedArtistBeatmapPill + artistContainer.Content[0][1] = new FeaturedArtistBeatmapBadge { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapBadgePill.cs b/osu.Game/Overlays/BeatmapSet/BeatmapBadge.cs similarity index 95% rename from osu.Game/Overlays/BeatmapSet/BeatmapBadgePill.cs rename to osu.Game/Overlays/BeatmapSet/BeatmapBadge.cs index 2c5042942ccb..6a444cc85f6c 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapBadgePill.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapBadge.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.BeatmapSet { - public abstract class BeatmapBadgePill : CompositeDrawable + public abstract class BeatmapBadge : CompositeDrawable { [Resolved] protected OsuColour Colours { get; private set; } = null!; @@ -34,7 +34,7 @@ public abstract class BeatmapBadgePill : CompositeDrawable // todo: add linking support, to allow redirecting featured artist badge to corresponding track and spotlight badge to wiki page. - protected BeatmapBadgePill() + protected BeatmapBadge() { AutoSizeAxes = Axes.Both; } diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs index 4233cfcb709f..56efb725cde6 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs @@ -40,9 +40,9 @@ public class BeatmapSetHeaderContent : CompositeDrawable private readonly OsuSpriteText title, artist; private readonly AuthorInfo author; - private readonly ExplicitContentBeatmapPill explicitContentPill; - private readonly SpotlightBeatmapPill spotlightPill; - private readonly FeaturedArtistBeatmapPill featuredArtistPill; + private readonly ExplicitContentBeatmapBadge explicitContent; + private readonly SpotlightBeatmapBadge spotlight; + private readonly FeaturedArtistBeatmapBadge featuredArtist; private readonly FillFlowContainer downloadButtonsContainer; private readonly BeatmapAvailability beatmapAvailability; @@ -129,14 +129,14 @@ public BeatmapSetHeaderContent() Origin = Anchor.BottomLeft, Margin = new MarginPadding { Left = 5, Bottom = 4 }, // To better lineup with the font }, - explicitContentPill = new ExplicitContentBeatmapPill + explicitContent = new ExplicitContentBeatmapBadge { Alpha = 0f, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Margin = new MarginPadding { Left = 10, Bottom = 4 }, }, - spotlightPill = new SpotlightBeatmapPill + spotlight = new SpotlightBeatmapBadge { Alpha = 0f, Anchor = Anchor.BottomLeft, @@ -156,7 +156,7 @@ public BeatmapSetHeaderContent() { Font = OsuFont.GetFont(size: 20, weight: FontWeight.Medium, italics: true), }, - featuredArtistPill = new FeaturedArtistBeatmapPill + featuredArtist = new FeaturedArtistBeatmapBadge { Alpha = 0f, Anchor = Anchor.BottomLeft, @@ -267,9 +267,9 @@ private void load(OverlayColourProvider colourProvider) title.Text = new RomanisableString(setInfo.NewValue.TitleUnicode, setInfo.NewValue.Title); artist.Text = new RomanisableString(setInfo.NewValue.ArtistUnicode, setInfo.NewValue.Artist); - explicitContentPill.Alpha = setInfo.NewValue.HasExplicitContent ? 1 : 0; - spotlightPill.Alpha = setInfo.NewValue.FeaturedInSpotlight ? 1 : 0; - featuredArtistPill.Alpha = setInfo.NewValue.TrackId != null ? 1 : 0; + explicitContent.Alpha = setInfo.NewValue.HasExplicitContent ? 1 : 0; + spotlight.Alpha = setInfo.NewValue.FeaturedInSpotlight ? 1 : 0; + featuredArtist.Alpha = setInfo.NewValue.TrackId != null ? 1 : 0; onlineStatusPill.FadeIn(500, Easing.OutQuint); onlineStatusPill.Status = setInfo.NewValue.Status; diff --git a/osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapPill.cs b/osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapBadge.cs similarity index 88% rename from osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapPill.cs rename to osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapBadge.cs index f8530f3a1617..b78b203a21e3 100644 --- a/osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapPill.cs +++ b/osu.Game/Overlays/BeatmapSet/ExplicitContentBeatmapBadge.cs @@ -9,7 +9,7 @@ namespace osu.Game.Overlays.BeatmapSet { - public class ExplicitContentBeatmapPill : BeatmapBadgePill + public class ExplicitContentBeatmapBadge : BeatmapBadge { public override LocalisableString BadgeText => BeatmapsetsStrings.NsfwBadgeLabel; public override Colour4 BadgeColour => Colours.Orange2; diff --git a/osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapPill.cs b/osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapBadge.cs similarity index 88% rename from osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapPill.cs rename to osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapBadge.cs index 4c29ede12eb5..b4719112175e 100644 --- a/osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapPill.cs +++ b/osu.Game/Overlays/BeatmapSet/FeaturedArtistBeatmapBadge.cs @@ -9,7 +9,7 @@ namespace osu.Game.Overlays.BeatmapSet { - public class FeaturedArtistBeatmapPill : BeatmapBadgePill + public class FeaturedArtistBeatmapBadge : BeatmapBadge { public override LocalisableString BadgeText => BeatmapsetsStrings.FeaturedArtistBadgeLabel; public override Colour4 BadgeColour => Colours.Blue1; diff --git a/osu.Game/Overlays/BeatmapSet/SpotlightBeatmapPill.cs b/osu.Game/Overlays/BeatmapSet/SpotlightBeatmapBadge.cs similarity index 89% rename from osu.Game/Overlays/BeatmapSet/SpotlightBeatmapPill.cs rename to osu.Game/Overlays/BeatmapSet/SpotlightBeatmapBadge.cs index 7376889d7b6e..caa2043474e7 100644 --- a/osu.Game/Overlays/BeatmapSet/SpotlightBeatmapPill.cs +++ b/osu.Game/Overlays/BeatmapSet/SpotlightBeatmapBadge.cs @@ -9,7 +9,7 @@ namespace osu.Game.Overlays.BeatmapSet { - public class SpotlightBeatmapPill : BeatmapBadgePill + public class SpotlightBeatmapBadge : BeatmapBadge { public override LocalisableString BadgeText => BeatmapsetsStrings.SpotlightBadgeLabel; public override Colour4 BadgeColour => Colours.Pink1; diff --git a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs index 2618e15d31d6..39853a5c451e 100644 --- a/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs +++ b/osu.Game/Screens/OnlinePlay/DrawableRoomPlaylistItem.cs @@ -78,7 +78,7 @@ public class DrawableRoomPlaylistItem : OsuRearrangeableListItem private Container difficultyIconContainer; private LinkFlowContainer beatmapText; private LinkFlowContainer authorText; - private ExplicitContentBeatmapPill explicitContentPill; + private ExplicitContentBeatmapBadge explicitContent; private ModDisplay modDisplay; private FillFlowContainer buttonsFlow; private UpdateableAvatar ownerAvatar; @@ -293,7 +293,7 @@ private void refresh() } bool hasExplicitContent = (beatmap?.BeatmapSet as IBeatmapSetOnlineInfo)?.HasExplicitContent == true; - explicitContentPill.Alpha = hasExplicitContent ? 1 : 0; + explicitContent.Alpha = hasExplicitContent ? 1 : 0; modDisplay.Current.Value = requiredMods.ToArray(); @@ -380,7 +380,7 @@ protected override Drawable CreateContent() Children = new Drawable[] { authorText = new LinkFlowContainer(fontParameters) { AutoSizeAxes = Axes.Both }, - explicitContentPill = new ExplicitContentBeatmapPill + explicitContent = new ExplicitContentBeatmapBadge { Alpha = 0f, Anchor = Anchor.CentreLeft,