mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Merge pull request #20825 from peppy/fix-argon-editor-combo-colour-change
Fix some argon circle layers not getting correct colour updates in editor
This commit is contained in:
@ -108,18 +108,23 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
|||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
accentColour.BindValueChanged(colour =>
|
|
||||||
{
|
|
||||||
outerFill.Colour = innerFill.Colour = colour.NewValue.Darken(4);
|
|
||||||
outerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue, colour.NewValue.Darken(0.1f));
|
|
||||||
innerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue.Darken(0.5f), colour.NewValue.Darken(0.6f));
|
|
||||||
flash.Colour = colour.NewValue;
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
indexInCurrentCombo.BindValueChanged(index => number.Text = (index.NewValue + 1).ToString(), true);
|
indexInCurrentCombo.BindValueChanged(index => number.Text = (index.NewValue + 1).ToString(), true);
|
||||||
|
|
||||||
drawableObject.ApplyCustomUpdateState += updateStateTransforms;
|
accentColour.BindValueChanged(colour =>
|
||||||
|
{
|
||||||
|
// A colour transform is applied.
|
||||||
|
// Without removing transforms first, when it is rewound it may apply an old colour.
|
||||||
|
outerGradient.ClearTransforms(targetMember: nameof(Colour));
|
||||||
|
outerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue, colour.NewValue.Darken(0.1f));
|
||||||
|
|
||||||
|
outerFill.Colour = innerFill.Colour = colour.NewValue.Darken(4);
|
||||||
|
innerGradient.Colour = ColourInfo.GradientVertical(colour.NewValue.Darken(0.5f), colour.NewValue.Darken(0.6f));
|
||||||
|
flash.Colour = colour.NewValue;
|
||||||
|
|
||||||
updateStateTransforms(drawableObject, drawableObject.State.Value);
|
updateStateTransforms(drawableObject, drawableObject.State.Value);
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
drawableObject.ApplyCustomUpdateState += updateStateTransforms;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)
|
private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)
|
||||||
@ -173,11 +178,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
|||||||
.FadeOut(flash_in_duration);
|
.FadeOut(flash_in_duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The flash layer starts white to give the wanted brightness, but is almost immediately
|
|
||||||
// recoloured to the accent colour. This would more correctly be done with two layers (one for the initial flash)
|
|
||||||
// but works well enough with the colour fade.
|
|
||||||
flash.FadeTo(1, flash_in_duration, Easing.OutQuint);
|
flash.FadeTo(1, flash_in_duration, Easing.OutQuint);
|
||||||
flash.FlashColour(accentColour.Value, fade_out_time, Easing.OutQuint);
|
|
||||||
|
|
||||||
this.FadeOut(fade_out_time, Easing.OutQuad);
|
this.FadeOut(fade_out_time, Easing.OutQuad);
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user