mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Make EditorScreen abstract
This commit is contained in:
@ -19,13 +19,13 @@ using osu.Framework.Timing;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Edit.Components;
|
using osu.Game.Screens.Edit.Components;
|
||||||
using osu.Game.Screens.Edit.Components.Menus;
|
using osu.Game.Screens.Edit.Components.Menus;
|
||||||
using osu.Game.Screens.Edit.Compose;
|
|
||||||
using osu.Game.Screens.Edit.Design;
|
using osu.Game.Screens.Edit.Design;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework;
|
using osu.Framework;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
|
using osu.Game.Screens.Edit.Compose;
|
||||||
using osu.Game.Screens.Edit.Setup;
|
using osu.Game.Screens.Edit.Setup;
|
||||||
using osu.Game.Screens.Edit.Timing;
|
using osu.Game.Screens.Edit.Timing;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
@ -275,10 +275,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
case EditorScreenMode.Timing:
|
case EditorScreenMode.Timing:
|
||||||
currentScreen = new TimingScreen();
|
currentScreen = new TimingScreen();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
currentScreen = new EditorScreen();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadComponentAsync(currentScreen, screenContainer.Add);
|
LoadComponentAsync(currentScreen, screenContainer.Add);
|
||||||
|
@ -10,16 +10,17 @@ using osu.Game.Beatmaps;
|
|||||||
namespace osu.Game.Screens.Edit
|
namespace osu.Game.Screens.Edit
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TODO: eventually make this inherit Screen and add a local scren stack inside the Editor.
|
/// TODO: eventually make this inherit Screen and add a local screen stack inside the Editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EditorScreen : Container
|
public abstract class EditorScreen : Container
|
||||||
{
|
{
|
||||||
protected readonly IBindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
|
[Resolved]
|
||||||
|
protected IBindable<WorkingBeatmap> Beatmap { get; private set; }
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
|
|
||||||
public EditorScreen()
|
protected EditorScreen()
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
@ -28,12 +29,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
InternalChild = content = new Container { RelativeSizeAxes = Axes.Both };
|
InternalChild = content = new Container { RelativeSizeAxes = Axes.Both };
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(IBindable<WorkingBeatmap> beatmap)
|
|
||||||
{
|
|
||||||
Beatmap.BindTo(beatmap);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
Reference in New Issue
Block a user