Skip to content

Commit

Permalink
Integrate spotlight beatmap badge in info overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed May 14, 2022
1 parent 56d6cb5 commit 2878a6d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions osu.Game/Overlays/BeatmapSet/BeatmapSetHeaderContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ public class BeatmapSetHeaderContent : CompositeDrawable
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;
Expand Down Expand Up @@ -127,6 +130,13 @@ public BeatmapSetHeaderContent()
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,
Expand Down Expand Up @@ -258,6 +268,7 @@ private void load(OverlayColourProvider colourProvider)
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);
Expand Down

0 comments on commit 2878a6d

Please sign in to comment.