mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Share colour constants with default drawable piece implementations
This commit is contained in:
@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
{
|
||||
public readonly Bindable<HitType> TypeBindable = new Bindable<HitType>();
|
||||
|
||||
public Bindable<Color4> DisplayColour { get; } = new Bindable<Color4>(colour_centre);
|
||||
public Bindable<Color4> DisplayColour { get; } = new Bindable<Color4>(COLOUR_CENTRE);
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="HitType"/> that actuates this <see cref="Hit"/>.
|
||||
@ -25,15 +25,15 @@ namespace osu.Game.Rulesets.Taiko.Objects
|
||||
set => TypeBindable.Value = value;
|
||||
}
|
||||
|
||||
private static readonly Color4 colour_centre = Color4Extensions.FromHex(@"bb1177");
|
||||
private static readonly Color4 colour_rim = Color4Extensions.FromHex(@"2299bb");
|
||||
public static readonly Color4 COLOUR_CENTRE = Color4Extensions.FromHex(@"bb1177");
|
||||
public static readonly Color4 COLOUR_RIM = Color4Extensions.FromHex(@"2299bb");
|
||||
|
||||
public Hit()
|
||||
{
|
||||
TypeBindable.BindValueChanged(_ =>
|
||||
{
|
||||
updateSamplesFromType();
|
||||
DisplayColour.Value = Type == HitType.Centre ? colour_centre : colour_rim;
|
||||
DisplayColour.Value = Type == HitType.Centre ? COLOUR_CENTRE : COLOUR_RIM;
|
||||
});
|
||||
|
||||
SamplesBindable.BindCollectionChanged((_, __) => updateTypeFromSamples());
|
||||
|
Reference in New Issue
Block a user