From 2878a6dcbed331b7f73e5f8eb877fbc73745f7c2 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 14 May 2022 19:47:10 +0300 Subject: [PATCH] Integrate spotlight beatmap badge in info overlay --- .../Overlays/BeatmapSet/BeatmapSetHeaderContent.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs index 8f4089c707..4233cfcb70 100644 --- a/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs +++ b/osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs @@ -39,8 +39,11 @@ namespace osu.Game.Overlays.BeatmapSet private readonly Box coverGradient; private readonly OsuSpriteText title, artist; private readonly AuthorInfo author; + private readonly ExplicitContentBeatmapPill explicitContentPill; + private readonly SpotlightBeatmapPill spotlightPill; private readonly FeaturedArtistBeatmapPill featuredArtistPill; + private readonly FillFlowContainer downloadButtonsContainer; private readonly BeatmapAvailability beatmapAvailability; private readonly BeatmapSetOnlineStatusPill onlineStatusPill; @@ -127,6 +130,13 @@ namespace osu.Game.Overlays.BeatmapSet Margin = new MarginPadding { Left = 5, Bottom = 4 }, // To better lineup with the font }, explicitContentPill = new ExplicitContentBeatmapPill + { + Alpha = 0f, + Anchor = Anchor.BottomLeft, + Origin = Anchor.BottomLeft, + Margin = new MarginPadding { Left = 10, Bottom = 4 }, + }, + spotlightPill = new SpotlightBeatmapPill { Alpha = 0f, Anchor = Anchor.BottomLeft, @@ -258,6 +268,7 @@ namespace osu.Game.Overlays.BeatmapSet 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; onlineStatusPill.FadeIn(500, Easing.OutQuint);