mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 15:12:57 +08:00
Implement EditSongSelect and MatchSongSelect.
This commit is contained in:
parent
3871a350f8
commit
618e8e822b
@ -1,14 +1,21 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework.Screens;
|
|
||||||
using osu.Game.Screens.Backgrounds;
|
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Screens.Backgrounds;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Edit
|
namespace osu.Game.Screens.Edit
|
||||||
{
|
{
|
||||||
internal class Editor : ScreenWhiteBox
|
internal class Editor : ScreenWhiteBox
|
||||||
{
|
{
|
||||||
|
private WorkingBeatmap beatmap;
|
||||||
|
public Editor(WorkingBeatmap wokringBeatmap)
|
||||||
|
{
|
||||||
|
beatmap = wokringBeatmap;
|
||||||
|
}
|
||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||||
|
|
||||||
protected override void OnEntering(Screen last)
|
protected override void OnEntering(Screen last)
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using OpenTK.Input;
|
||||||
using System.Collections.Generic;
|
using osu.Framework.Allocation;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
internal class EditSongSelect : ScreenWhiteBox
|
internal class EditSongSelect : SongSelect
|
||||||
{
|
{
|
||||||
protected override IEnumerable<Type> PossibleChildren => new[] {
|
protected override void OnSelected(WorkingBeatmap beatmap) => Push(new Editor(beatmap));
|
||||||
typeof(Editor)
|
[BackgroundDependencyLoader]
|
||||||
};
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
Footer.AddButton(@"random", colours.Green, SelectRandom, Key.F2);
|
||||||
|
Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3);
|
||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, PromptDelete, Key.Number4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,23 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Screens.Backgrounds;
|
using OpenTK.Input;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select
|
namespace osu.Game.Screens.Select
|
||||||
{
|
{
|
||||||
internal class MatchSongSelect : ScreenWhiteBox
|
internal class MatchSongSelect : SongSelect
|
||||||
{
|
{
|
||||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
protected override void OnSelected(WorkingBeatmap beatmap) => Exit();
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(OsuColour colours)
|
||||||
|
{
|
||||||
|
Footer.AddButton(@"random", colours.Green, SelectRandom, Key.F2);
|
||||||
|
Footer.AddButton(@"options", colours.Blue, BeatmapOptions.ToggleVisibility, Key.F3);
|
||||||
|
|
||||||
|
BeatmapOptions.AddButton(@"Delete", @"Beatmap", FontAwesome.fa_trash, colours.Pink, PromptDelete, Key.Number4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user