mirror of https://github.com/ppy/osu
Update osu with legacy colour setters
This commit is contained in:
parent
454564b189
commit
16a2ab9dea
|
@ -59,7 +59,6 @@ private void load(DrawableHitObject drawableObject)
|
|||
hitCircleSprite = new Sprite
|
||||
{
|
||||
Texture = getTextureWithFallback(string.Empty),
|
||||
Colour = drawableObject.AccentColour.Value,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
},
|
||||
|
@ -107,7 +106,7 @@ protected override void LoadComplete()
|
|||
base.LoadComplete();
|
||||
|
||||
state.BindValueChanged(updateState, true);
|
||||
accentColour.BindValueChanged(colour => hitCircleSprite.Colour = colour.NewValue, true);
|
||||
accentColour.BindValueChanged(colour => hitCircleSprite.Colour = colour.NewValue.ToLegacyColour(), true);
|
||||
indexInCurrentCombo.BindValueChanged(index => hitCircleText.Text = (index.NewValue + 1).ToString(), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ public LegacySliderBall(Drawable animationContent)
|
|||
[BackgroundDependencyLoader]
|
||||
private void load(ISkinSource skin, DrawableHitObject drawableObject)
|
||||
{
|
||||
animationContent.Colour = skin.GetConfig<OsuSkinColour, Color4>(OsuSkinColour.SliderBall)?.Value ?? Color4.White;
|
||||
var ballColour = skin.GetConfig<OsuSkinColour, Color4>(OsuSkinColour.SliderBall)?.Value ?? Color4.White;
|
||||
|
||||
InternalChildren = new[]
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ private void load(ISkinSource skin, DrawableHitObject drawableObject)
|
|||
Texture = skin.GetTexture("sliderb-nd"),
|
||||
Colour = new Color4(5, 5, 5, 255),
|
||||
},
|
||||
animationContent.With(d =>
|
||||
animationContent.WithInitialColour(ballColour).With(d =>
|
||||
{
|
||||
d.Anchor = Anchor.Centre;
|
||||
d.Origin = Anchor.Centre;
|
||||
|
|
Loading…
Reference in New Issue