2019-01-24 08:43:03 +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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-05-23 08:37:39 +00:00
|
|
|
using osu.Framework.Allocation;
|
2018-04-13 09:19:50 +00:00
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
2018-11-06 09:28:22 +00:00
|
|
|
namespace osu.Game.Screens.Edit
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
|
|
|
/// <summary>
|
2019-10-09 07:04:58 +00:00
|
|
|
/// TODO: eventually make this inherit Screen and add a local screen stack inside the Editor.
|
2018-04-13 09:19:50 +00:00
|
|
|
/// </summary>
|
2019-10-09 07:04:58 +00:00
|
|
|
public abstract class EditorScreen : Container
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2019-12-27 10:46:33 +00:00
|
|
|
[Resolved]
|
|
|
|
protected EditorBeatmap EditorBeatmap { get; private set; }
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
protected override Container<Drawable> Content => content;
|
|
|
|
private readonly Container content;
|
|
|
|
|
2020-09-24 08:03:54 +00:00
|
|
|
public readonly EditorScreenMode Type;
|
|
|
|
|
|
|
|
protected EditorScreen(EditorScreenMode type)
|
2018-04-13 09:19:50 +00:00
|
|
|
{
|
2020-09-24 08:03:54 +00:00
|
|
|
Type = type;
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
|
|
|
InternalChild = content = new Container { RelativeSizeAxes = Axes.Both };
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
|
|
|
this.FadeTo(0)
|
|
|
|
.Then()
|
|
|
|
.FadeTo(1f, 250, Easing.OutQuint);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|