Remove all references to static OverlayColourProviders

This commit is contained in:
Bartłomiej Dach 2022-02-20 20:46:12 +01:00
parent 79ba37bbab
commit ce0db9d4db
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
4 changed files with 15 additions and 3 deletions

View File

@ -1,6 +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.Allocation;
using osu.Game.Graphics;
using osu.Game.Resources.Localisation.Web;
using osuTK.Graphics;
@ -33,7 +35,10 @@ namespace osu.Game.Overlays.BeatmapListing
{
}
protected override Color4 GetStateColour() => OverlayColourProvider.Orange.Colour1;
[Resolved]
private OsuColour colours { get; set; }
protected override Color4 GetStateColour() => colours.Orange1;
}
}
}

View File

@ -44,7 +44,14 @@ namespace osu.Game.Overlays.BeatmapListing
});
Enabled.Value = true;
}
protected override void LoadComplete()
{
base.LoadComplete();
updateState();
FinishTransforms(true);
}
protected override bool OnHover(HoverEvent e)

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.BeatmapSet
Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
Text = BeatmapsetsStrings.NsfwBadgeLabel.ToUpper(),
Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
Colour = OverlayColourProvider.Orange.Colour2,
Colour = colours.Orange2
}
}
};

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.BeatmapSet
Margin = new MarginPadding { Horizontal = 10f, Vertical = 2f },
Text = BeatmapsetsStrings.FeaturedArtistBadgeLabel.ToUpper(),
Font = OsuFont.GetFont(size: 10, weight: FontWeight.SemiBold),
Colour = OverlayColourProvider.Blue.Colour1,
Colour = colours.Blue1
}
}
};