From a5916f995eb2e9814ef2faa02d11cfc7e8293fa1 Mon Sep 17 00:00:00 2001 From: David Zhao Date: Wed, 20 Mar 2019 16:54:42 +0900 Subject: [PATCH] Use the previous conditional instead --- osu.Game/Screens/Play/PlayerLoader.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index a2d433107b..68335f96ce 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Linq; using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -245,14 +246,14 @@ namespace osu.Game.Screens.Play if (!this.IsCurrentScreen()) return; - if (Background.BlurAmount.Value != 0 && VisualSettings.IsHovered) + if (GetContainingInputManager()?.HoveredDrawables.Contains(VisualSettings) == true) { // Acts as an "on hover" trigger for the visual settings panel. // Preview user-defined background dim and blur when hovered on the visual settings panel. Background.EnableUserDim.Value = true; Background.BlurAmount.Value = 0; } - else if (Background.BlurAmount.Value != BACKGROUND_BLUR && !VisualSettings.IsHovered) + else { // Acts as an "on hover lost" trigger for the visual settings panel. // Returns background dim and blur to the values specified by PlayerLoader.