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();
}
}
}