1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +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,21 +12,13 @@ namespace osu.Game.Overlays.FirstRunSetup
{
public ScreenWelcome()
{
InternalChildren = new Drawable[]
Content.Children = new Drawable[]
{
new FillFlowContainer
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new OsuTextFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
{
Text = FirstRunSetupOverlayStrings.WelcomeDescription,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
},
}
Text = FirstRunSetupOverlayStrings.WelcomeDescription,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y
},
};
}