1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Use AccentColour

This commit is contained in:
Andrei Zavatski 2020-03-14 13:45:55 +03:00
parent 7e9d28b1b1
commit 74c9d5fc93
2 changed files with 12 additions and 5 deletions

View File

@ -185,7 +185,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
base.ApplySkin(skin, allowFallback);
bool allowBallTint = skin.GetConfig<OsuSkinConfiguration, bool>(OsuSkinConfiguration.AllowSliderBallTint)?.Value ?? false;
Ball.Colour = allowBallTint ? AccentColour.Value : Color4.White;
Ball.AccentColour = allowBallTint ? AccentColour.Value : Color4.White;
}
protected override void CheckForResult(bool userTriggered, double timeOffset)

View File

@ -16,17 +16,24 @@ using osu.Game.Rulesets.Osu.Skinning;
using osuTK.Graphics;
using osu.Game.Skinning;
using osuTK;
using osu.Game.Graphics;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
public class SliderBall : CircularContainer, ISliderProgress, IRequireHighFrequencyMousePosition
public class SliderBall : CircularContainer, ISliderProgress, IRequireHighFrequencyMousePosition, IHasAccentColour
{
public Func<OsuAction?> GetInitialHitAction;
public new Color4 Colour
private Color4 accentColour;
public Color4 AccentColour
{
get => ball.Colour;
set => ball.Colour = value;
get => accentColour;
set
{
accentColour = value;
ball.Colour = value;
}
}
private readonly Slider slider;