mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Fix handling of bindable changes in accent colour
This commit is contained in:
@ -18,6 +18,7 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
private readonly string lookupName;
|
||||
|
||||
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
|
||||
private Sprite colouredSprite;
|
||||
|
||||
public LegacyFruitPiece(string lookupName)
|
||||
{
|
||||
@ -34,7 +35,7 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Sprite
|
||||
colouredSprite = new Sprite
|
||||
{
|
||||
Texture = skin.GetTexture(lookupName),
|
||||
Colour = drawableObject.AccentColour.Value,
|
||||
@ -49,5 +50,12 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
accentColour.BindValueChanged(colour => colouredSprite.Colour = colour.NewValue, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user