Do not play open/close samples for top-level menus

This commit is contained in:
Bartłomiej Dach 2021-08-07 14:38:54 +02:00
parent 5031b19b42
commit ff1730f9f8
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -40,7 +40,7 @@ namespace osu.Game.Graphics.UserInterface
protected override void AnimateOpen()
{
if (!wasOpened)
if (!TopLevelMenu && !wasOpened)
sampleOpen?.Play();
this.FadeIn(300, Easing.OutQuint);
@ -49,7 +49,7 @@ namespace osu.Game.Graphics.UserInterface
protected override void AnimateClose()
{
if (wasOpened)
if (!TopLevelMenu && wasOpened)
sampleClose?.Play();
this.FadeOut(300, Easing.OutQuint);