osu/osu.Game/Overlays/OnlineOverlay.cs

49 lines
1.7 KiB
C#
Raw Normal View History

2021-01-18 07:48:12 +00:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays
{
2021-01-18 08:13:38 +00:00
public abstract class OnlineOverlay<T> : FullscreenOverlay<T>
2021-01-18 07:48:12 +00:00
where T : OverlayHeader
{
protected override Container<Drawable> Content => content;
protected readonly OverlayScrollContainer ScrollFlow;
protected readonly LoadingLayer Loading;
private readonly Container content;
2021-01-18 08:13:38 +00:00
protected OnlineOverlay(OverlayColourScheme colourScheme)
2021-01-18 07:48:12 +00:00
: base(colourScheme)
{
base.Content.AddRange(new Drawable[]
{
ScrollFlow = new OverlayScrollContainer
{
RelativeSizeAxes = Axes.Both,
ScrollbarVisible = false,
Child = new FillFlowContainer
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
Header.With(h => h.Depth = -float.MaxValue),
content = new Container
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
}
}
}
2021-01-18 07:48:12 +00:00
},
Loading = new LoadingLayer(true)
});
}
}
}