mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Recolour TotalCommentCounter
This commit is contained in:
@ -7,6 +7,8 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Game.Overlays.Comments;
|
using osu.Game.Overlays.Comments;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -17,6 +19,9 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
typeof(TotalCommentsCounter),
|
typeof(TotalCommentsCounter),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
public TestSceneTotalCommentsCounter()
|
public TestSceneTotalCommentsCounter()
|
||||||
{
|
{
|
||||||
var count = new BindableInt();
|
var count = new BindableInt();
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
@ -17,7 +16,9 @@ namespace osu.Game.Overlays.Comments
|
|||||||
{
|
{
|
||||||
public readonly BindableInt Current = new BindableInt();
|
public readonly BindableInt Current = new BindableInt();
|
||||||
|
|
||||||
private readonly SpriteText counter;
|
private readonly OsuSpriteText counter;
|
||||||
|
private readonly OsuSpriteText text;
|
||||||
|
private readonly Box pillBackground;
|
||||||
|
|
||||||
public TotalCommentsCounter()
|
public TotalCommentsCounter()
|
||||||
{
|
{
|
||||||
@ -33,7 +34,7 @@ namespace osu.Game.Overlays.Comments
|
|||||||
Spacing = new Vector2(5, 0),
|
Spacing = new Vector2(5, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
text = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
@ -48,10 +49,9 @@ namespace osu.Game.Overlays.Comments
|
|||||||
Masking = true,
|
Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
pillBackground = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(0.05f)
|
|
||||||
},
|
},
|
||||||
counter = new OsuSpriteText
|
counter = new OsuSpriteText
|
||||||
{
|
{
|
||||||
@ -67,9 +67,11 @@ namespace osu.Game.Overlays.Comments
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[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()
|
protected override void LoadComplete()
|
||||||
|
Reference in New Issue
Block a user