mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:43:21 +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>.
|
||||
// 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 osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
internal class Editor : ScreenWhiteBox
|
||||
{
|
||||
private WorkingBeatmap beatmap;
|
||||
public Editor(WorkingBeatmap wokringBeatmap)
|
||||
{
|
||||
beatmap = wokringBeatmap;
|
||||
}
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4");
|
||||
|
||||
protected override void OnEntering(Screen last)
|
||||
|
@ -1,19 +1,24 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Edit;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
internal class EditSongSelect : ScreenWhiteBox
|
||||
internal class EditSongSelect : SongSelect
|
||||
{
|
||||
protected override IEnumerable<Type> PossibleChildren => new[] {
|
||||
typeof(Editor)
|
||||
};
|
||||
protected override void OnSelected(WorkingBeatmap beatmap) => Push(new Editor(beatmap));
|
||||
[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>.
|
||||
// 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
|
||||
{
|
||||
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