Move BeatmapOptions buttons to derived class and simplify.

This commit is contained in:
Huo Yaoyuan
2017-03-14 19:38:21 +08:00
parent c4e5eac35b
commit 3871a350f8
9 changed files with 40 additions and 146 deletions

View File

@ -128,10 +128,6 @@ namespace osu.Game.Screens.Select
},
BeatmapOptions = new BeatmapOptionsOverlay
{
OnRemoveFromUnplayed = null,
OnClearLocalScores = null,
OnEdit = null,
OnDelete = promptDelete,
Margin = new MarginPadding
{
Bottom = 50,
@ -408,7 +404,7 @@ namespace osu.Game.Screens.Select
}
}
private void promptDelete()
protected void PromptDelete()
{
if (Beatmap != null)
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
@ -418,7 +414,7 @@ namespace osu.Game.Screens.Select
{
if (!args.Repeat && args.Key == Key.Delete && state.Keyboard.ShiftPressed)
{
promptDelete();
PromptDelete();
return true;
}