Replace Pill with Badge everywhere

This commit is contained in:
Salman Ahmed
2022-05-14 20:52:38 +03:00
parent 9bac33ec9f
commit 88ba84ac9c
8 changed files with 23 additions and 23 deletions

View File

@ -14,7 +14,7 @@ using osu.Game.Graphics.Sprites;
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 @@ namespace osu.Game.Overlays.BeatmapSet
// 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;
}

View File

@ -40,9 +40,9 @@ namespace osu.Game.Overlays.BeatmapSet
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 @@ namespace osu.Game.Overlays.BeatmapSet
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 @@ namespace osu.Game.Overlays.BeatmapSet
{
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 @@ namespace osu.Game.Overlays.BeatmapSet
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;

View File

@ -9,7 +9,7 @@ using osu.Game.Resources.Localisation.Web;
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;

View File

@ -9,7 +9,7 @@ using osu.Game.Resources.Localisation.Web;
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;

View File

@ -9,7 +9,7 @@ using osu.Game.Resources.Localisation.Web;
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;