1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Recolour TotalCommentCounter

This commit is contained in:
Andrei Zavatski 2020-01-27 14:47:47 +03:00
parent d0715700eb
commit ed2737e027
2 changed files with 14 additions and 7 deletions

View File

@ -7,6 +7,8 @@ using osu.Framework.Graphics;
using osu.Framework.Bindables;
using osu.Game.Overlays.Comments;
using osu.Framework.Utils;
using osu.Framework.Allocation;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual.Online
{
@ -17,6 +19,9 @@ namespace osu.Game.Tests.Visual.Online
typeof(TotalCommentsCounter),
};
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
public TestSceneTotalCommentsCounter()
{
var count = new BindableInt();

View File

@ -5,7 +5,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Framework.Graphics.Sprites;
using osuTK;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -17,7 +16,9 @@ namespace osu.Game.Overlays.Comments
{
public readonly BindableInt Current = new BindableInt();
private readonly SpriteText counter;
private readonly OsuSpriteText counter;
private readonly OsuSpriteText text;
private readonly Box pillBackground;
public TotalCommentsCounter()
{
@ -33,7 +34,7 @@ namespace osu.Game.Overlays.Comments
Spacing = new Vector2(5, 0),
Children = new Drawable[]
{
new OsuSpriteText
text = new OsuSpriteText
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
@ -48,10 +49,9 @@ namespace osu.Game.Overlays.Comments
Masking = true,
Children = new Drawable[]
{
new Box
pillBackground = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(0.05f)
},
counter = new OsuSpriteText
{
@ -67,9 +67,11 @@ namespace osu.Game.Overlays.Comments
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OverlayColourProvider colourProvider)
{
counter.Colour = colours.BlueLighter;
text.Colour = colourProvider.Light1;
pillBackground.Colour = colourProvider.Background6;
counter.Colour = colourProvider.Foreground1;
}
protected override void LoadComplete()