1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 23:40:45 +08:00

Fix overlay headers being blocked by loading layer

This commit is contained in:
Joseph Madamba
2023-03-20 22:26:51 -07:00
Unverified
parent e1fb63e1f3
commit 74a15d7424
+14 -1
View File
@@ -3,6 +3,7 @@
#nullable disable
using System;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -22,6 +23,7 @@ namespace osu.Game.Overlays
protected readonly OverlayScrollContainer ScrollFlow;
protected readonly LoadingLayer Loading;
private readonly Container loadingContainer;
private readonly Container content;
protected OnlineOverlay(OverlayColourScheme colourScheme, bool requiresSignIn = true)
@@ -65,10 +67,21 @@ namespace osu.Game.Overlays
},
}
},
Loading = new LoadingLayer(true)
loadingContainer = new Container
{
RelativeSizeAxes = Axes.Both,
Child = Loading = new LoadingLayer(true),
}
});
base.Content.Add(mainContent);
}
protected override void UpdateAfterChildren()
{
base.UpdateAfterChildren();
loadingContainer.Padding = new MarginPadding { Top = Math.Max(0, Header.Height - ScrollFlow.Current) };
}
}
}