1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:33:20 +08:00

Add scroll and flow at the FirstRunSetupScreen level

This commit is contained in:
Dean Herbert 2022-04-19 16:37:29 +09:00
parent c4bade0995
commit c27831145c
2 changed files with 28 additions and 14 deletions

View File

@ -2,7 +2,10 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osuTK;
namespace osu.Game.Overlays.FirstRunSetup
{
@ -10,6 +13,26 @@ namespace osu.Game.Overlays.FirstRunSetup
{
private const float offset = 100;
protected FillFlowContainer Content { get; private set; }
protected FirstRunSetupScreen()
{
InternalChildren = new Drawable[]
{
new OsuScrollContainer(Direction.Vertical)
{
RelativeSizeAxes = Axes.Both,
Child = Content = new FillFlowContainer
{
Spacing = new Vector2(20),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
},
}
};
}
public override void OnEntering(IScreen last)
{
base.OnEntering(last);

View File

@ -2,7 +2,6 @@
// 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;
using osu.Game.Graphics.Containers;
using osu.Game.Localisation;
@ -13,13 +12,7 @@ namespace osu.Game.Overlays.FirstRunSetup
{
public ScreenWelcome()
{
InternalChildren = new Drawable[]
{
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
Content.Children = new Drawable[]
{
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
{
@ -27,8 +20,6 @@ namespace osu.Game.Overlays.FirstRunSetup
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
},
}
},
};
}
}