2021-04-19 12:57:46 +08: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.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2021-11-11 21:00:09 +08:00
|
|
|
using osu.Game.Overlays;
|
2021-04-19 12:57:46 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
2021-05-12 15:53:49 +08:00
|
|
|
public class EditorRoundedScreen : EditorScreen
|
2021-04-19 12:57:46 +08:00
|
|
|
{
|
|
|
|
public const int HORIZONTAL_PADDING = 100;
|
|
|
|
|
|
|
|
private Container roundedContent;
|
|
|
|
|
|
|
|
protected override Container<Drawable> Content => roundedContent;
|
|
|
|
|
2021-05-12 15:53:49 +08:00
|
|
|
public EditorRoundedScreen(EditorScreenMode mode)
|
2021-04-19 12:57:46 +08:00
|
|
|
: base(mode)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2021-11-11 21:00:09 +08:00
|
|
|
private void load(OverlayColourProvider colourProvider)
|
2021-04-19 12:57:46 +08:00
|
|
|
{
|
|
|
|
base.Content.Add(new Container
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Padding = new MarginPadding(50),
|
|
|
|
Child = new Container
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Masking = true,
|
|
|
|
CornerRadius = 10,
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
2021-11-11 21:00:09 +08:00
|
|
|
Colour = colourProvider.Background3,
|
2021-04-19 12:57:46 +08:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
|
|
|
roundedContent = new Container
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|