Skip to content

Commit

Permalink
Merge pull request ppy#18237 from peppy/editor-animation-toggle-refre…
Browse files Browse the repository at this point in the history
…sh-immediately

Fix toggling hit animations on the editor not applying immediately
  • Loading branch information
smoogipoo authored May 12, 2022
2 parents b48308e + f5649b9 commit c3d4723
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions osu.Game.Rulesets.Osu/Edit/DrawableOsuEditorRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public OsuEditorPlayfield()
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)
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Rulesets/Objects/Drawables/DrawableHitObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ private void clearExistingStateTransforms()
/// <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.
Expand Down

0 comments on commit c3d4723

Please sign in to comment.