mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Remove intermediate Screens namespace
This commit is contained in:
51
osu.Game/Screens/Edit/EditorScreen.cs
Normal file
51
osu.Game/Screens/Edit/EditorScreen.cs
Normal file
@ -0,0 +1,51 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
/// <summary>
|
||||
/// TODO: eventually make this inherit Screen and add a local scren stack inside the Editor.
|
||||
/// </summary>
|
||||
public class EditorScreen : Container
|
||||
{
|
||||
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
private readonly Container content;
|
||||
|
||||
public EditorScreen()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
InternalChild = content = new Container { RelativeSizeAxes = Axes.Both };
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(IBindableBeatmap beatmap)
|
||||
{
|
||||
Beatmap.BindTo(beatmap);
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
this.FadeTo(0)
|
||||
.Then()
|
||||
.FadeTo(1f, 250, Easing.OutQuint);
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
this.FadeOut(250).Expire();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user