diff --git a/osu.Game/Graphics/UserInterface/LoadingLayer.cs b/osu.Game/Graphics/UserInterface/LoadingLayer.cs
index 29b0201225..9f6177c226 100644
--- a/osu.Game/Graphics/UserInterface/LoadingLayer.cs
+++ b/osu.Game/Graphics/UserInterface/LoadingLayer.cs
@@ -20,6 +20,8 @@ namespace osu.Game.Graphics.UserInterface
///
public class LoadingLayer : LoadingSpinner
{
+ private readonly bool blockInput;
+
[CanBeNull]
protected Box BackgroundDimLayer { get; }
@@ -28,9 +30,11 @@ namespace osu.Game.Graphics.UserInterface
///
/// Whether the full background area should be dimmed while loading.
/// Whether the spinner should have a surrounding black box for visibility.
- public LoadingLayer(bool dimBackground = false, bool withBox = true)
+ /// Whether to block input of components behind the loading layer.
+ public LoadingLayer(bool dimBackground = false, bool withBox = true, bool blockInput = true)
: base(withBox)
{
+ this.blockInput = blockInput;
RelativeSizeAxes = Axes.Both;
Size = new Vector2(1);
@@ -52,6 +56,9 @@ namespace osu.Game.Graphics.UserInterface
protected override bool Handle(UIEvent e)
{
+ if (!blockInput)
+ return false;
+
switch (e)
{
// blocking scroll can cause weird behaviour when this layer is used within a ScrollContainer.