Make AccentColour a bindable (#5420)

Make AccentColour a bindable

Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
Dean Herbert
2019-07-23 20:37:47 +09:00
committed by GitHub
15 changed files with 74 additions and 118 deletions

View File

@ -9,7 +9,6 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.Graphics.Primitives;
using osu.Game.Audio;
using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
@ -18,14 +17,14 @@ using osuTK.Graphics;
namespace osu.Game.Rulesets.Objects.Drawables
{
public abstract class DrawableHitObject : SkinReloadableDrawable, IHasAccentColour
public abstract class DrawableHitObject : SkinReloadableDrawable
{
public readonly HitObject HitObject;
/// <summary>
/// The colour used for various elements of this DrawableHitObject.
/// </summary>
public virtual Color4 AccentColour { get; set; } = Color4.Gray;
public readonly Bindable<Color4> AccentColour = new Bindable<Color4>(Color4.Gray);
// Todo: Rulesets should be overriding the resources instead, but we need to figure out where/when to apply overrides first
protected virtual string SampleNamespace => null;