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

Flush animation on closing mod overlay

This commit is contained in:
Dean Herbert 2021-02-04 19:12:37 +09:00
parent a2674f3c3f
commit bf239f8bef
2 changed files with 14 additions and 0 deletions

View File

@ -231,5 +231,14 @@ namespace osu.Game.Overlays.Mods
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Text = text
};
/// <summary>
/// Play out all remaining animations immediately to leave mods in a good (final) state.
/// </summary>
public void FlushAnimation()
{
while (pendingSelectionOperations.TryDequeue(out var dequeuedAction))
dequeuedAction();
}
}
}

View File

@ -379,6 +379,11 @@ namespace osu.Game.Overlays.Mods
{
base.PopOut();
foreach (var section in ModSectionsContainer)
{
section.FlushAnimation();
}
FooterContainer.MoveToX(content_width, WaveContainer.DISAPPEAR_DURATION, Easing.InSine);
FooterContainer.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InSine);