2021-09-08 12:27:20 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2021-09-09 18:25:30 +08:00
|
|
|
using osu.Framework.Allocation;
|
2021-09-08 12:27:20 +08:00
|
|
|
using osu.Framework.Extensions.LocalisationExtensions;
|
|
|
|
using osu.Framework.Graphics;
|
2021-09-09 11:51:21 +08:00
|
|
|
using osu.Framework.Graphics.Containers;
|
2021-09-09 18:25:30 +08:00
|
|
|
using osu.Framework.Graphics.Shapes;
|
2021-09-08 12:27:20 +08:00
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.BeatmapSet
|
|
|
|
{
|
2021-09-09 11:51:21 +08:00
|
|
|
public class FeaturedArtistBeatmapPill : CompositeDrawable
|
2021-09-08 12:27:20 +08:00
|
|
|
{
|
2021-09-09 11:51:21 +08:00
|
|
|
public FeaturedArtistBeatmapPill()
|
2021-09-08 12:27:20 +08:00
|
|
|
{
|
2021-09-09 11:51:21 +08:00
|
|
|
AutoSizeAxes = Axes.Both;
|
2021-09-09 18:25:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader(true)]
|
|
|
|
private void load(OsuColour colours, OverlayColourProvider colourProvider)
|
|
|
|
{
|
|
|
|
InternalChild = new CircularContainer
|
2021-09-08 12:27:20 +08:00
|
|
|
{
|
2021-09-09 18:25:30 +08:00
|
|
|
Masking = true,
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
Children = new Drawable[]
|
2021-09-09 11:51:21 +08:00
|
|
|
{
|
2021-09-09 18:25:30 +08:00
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Colour = colourProvider?.Background5 ?? colours.Gray2,
|
|
|
|
},
|
|
|
|
new OsuSpriteText
|
|
|
|
{
|
|
|
|
Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
|
|
|
|
Text = BeatmapsetsStrings.FeaturedArtistBadgeLabel.ToUpper(),
|
|
|
|
Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
|
|
|
|
Colour = OverlayColourProvider.Blue.Colour1,
|
|
|
|
}
|
2021-09-09 11:51:21 +08:00
|
|
|
}
|
|
|
|
};
|
2021-09-08 12:27:20 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|