1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

Merge pull request #18237 from peppy/editor-animation-toggle-refresh-immediately

Fix toggling hit animations on the editor not applying immediately
This commit is contained in:
Dan Balasescu 2022-05-12 18:51:04 +09:00 committed by GitHub
commit c3d472310f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -50,6 +50,11 @@ namespace osu.Game.Rulesets.Osu.Edit
private void load(OsuConfigManager config)
{
hitAnimations = config.GetBindable<bool>(OsuSetting.EditorHitAnimations);
hitAnimations.BindValueChanged(_ =>
{
foreach (var d in HitObjectContainer.AliveObjects)
d.RefreshStateTransforms();
});
}
protected override void OnNewDrawableHitObject(DrawableHitObject d)

View File

@ -448,7 +448,7 @@ namespace osu.Game.Rulesets.Objects.Drawables
/// <summary>
/// Reapplies the current <see cref="ArmedState"/>.
/// </summary>
protected void RefreshStateTransforms() => updateState(State.Value, true);
public void RefreshStateTransforms() => updateState(State.Value, true);
/// <summary>
/// Apply (generally fade-in) transforms leading into the <see cref="HitObject"/> start time.