From 7716a96b2848d32d1e49c932d8a25d19a877aa02 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Mon, 6 Jan 2020 23:07:58 +0300 Subject: [PATCH 1/2] Allow scrolling through DimmedLoadingLayer --- .../Graphics/UserInterface/DimmedLoadingLayer.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs b/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs index f2f6dd429b..aca3768540 100644 --- a/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs +++ b/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Extensions.Color4Extensions; using osuTK; +using osu.Framework.Input.Events; namespace osu.Game.Graphics.UserInterface { @@ -41,5 +42,16 @@ namespace osu.Game.Graphics.UserInterface this.FadeOut(transition_duration, Easing.OutQuint); loading.Hide(); } + + protected override bool Handle(UIEvent e) + { + switch (e) + { + case ScrollEvent _: + return false; + } + + return base.Handle(e); + } } } From ffa0cf2d44174c870c5c0dc2173b73e9ba496a89 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Jan 2020 17:28:48 +0800 Subject: [PATCH 2/2] Add comment detailing why this is requried --- osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs b/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs index aca3768540..bdc3cd4c49 100644 --- a/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs +++ b/osu.Game/Graphics/UserInterface/DimmedLoadingLayer.cs @@ -47,6 +47,7 @@ namespace osu.Game.Graphics.UserInterface { switch (e) { + // blocking scroll can cause weird behaviour when this layer is used within a ScrollContainer. case ScrollEvent _: return false; }