Convert get-only virtual properties to avoid DI order dependency

This commit is contained in:
Salman Ahmed
2022-05-14 21:01:29 +03:00
parent 88ba84ac9c
commit 441957e18e
4 changed files with 37 additions and 25 deletions

View File

@ -1,8 +1,8 @@
// 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.
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Framework.Allocation;
using osu.Game.Graphics;
using osu.Game.Resources.Localisation.Web;
#nullable enable
@ -11,7 +11,11 @@ namespace osu.Game.Overlays.BeatmapSet
{
public class SpotlightBeatmapBadge : BeatmapBadge
{
public override LocalisableString BadgeText => BeatmapsetsStrings.SpotlightBadgeLabel;
public override Colour4 BadgeColour => Colours.Pink1;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
BadgeText = BeatmapsetsStrings.SpotlightBadgeLabel;
BadgeColour = colours.Pink1;
}
}
}