1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 07:47:25 +08:00
osu-lazer/osu.Game/Screens/Edit/EditorScreen.cs

47 lines
1.3 KiB
C#
Raw Normal View History

// 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 17:19:50 +08:00
using osu.Framework.Allocation;
2018-04-13 17:19:50 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2018-11-06 17:28:22 +08:00
namespace osu.Game.Screens.Edit
2018-04-13 17:19:50 +08:00
{
/// <summary>
2019-10-09 15:04:58 +08:00
/// TODO: eventually make this inherit Screen and add a local screen stack inside the Editor.
2018-04-13 17:19:50 +08:00
/// </summary>
public abstract class EditorScreen : VisibilityContainer
2018-04-13 17:19:50 +08:00
{
[Resolved]
protected EditorBeatmap EditorBeatmap { get; private set; }
2018-04-13 17:19:50 +08:00
protected override Container<Drawable> Content => content;
private readonly Container content;
public readonly EditorScreenMode Type;
protected EditorScreen(EditorScreenMode type)
2018-04-13 17:19:50 +08:00
{
Type = type;
2018-04-13 17:19:50 +08:00
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
RelativeSizeAxes = Axes.Both;
InternalChild = content = new Container { RelativeSizeAxes = Axes.Both };
}
protected override void PopIn()
2018-04-13 17:19:50 +08:00
{
this.ScaleTo(1f, 200, Easing.OutQuint)
.FadeIn(200, Easing.OutQuint);
}
2018-04-13 17:19:50 +08:00
protected override void PopOut()
{
this.ScaleTo(0.98f, 200, Easing.OutQuint)
.FadeOut(200, Easing.OutQuint);
2018-04-13 17:19:50 +08:00
}
}
}