From ff1730f9f8edfe29ca2eae30a3ff0442a42fd282 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 7 Aug 2021 14:38:54 +0200 Subject: [PATCH] Do not play open/close samples for top-level menus --- osu.Game/Graphics/UserInterface/OsuMenu.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuMenu.cs b/osu.Game/Graphics/UserInterface/OsuMenu.cs index b98a29aacb..a16adcbd57 100644 --- a/osu.Game/Graphics/UserInterface/OsuMenu.cs +++ b/osu.Game/Graphics/UserInterface/OsuMenu.cs @@ -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);