mirror of
https://github.com/ppy/osu.git
synced 2025-01-23 02:22:55 +08:00
moved action to construction arguments
This commit is contained in:
parent
cdf9ea0d01
commit
59e8536ff7
@ -1,7 +1,6 @@
|
|||||||
// 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 System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -39,12 +38,11 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
Text = "Delete ALL beatmaps",
|
Text = "Delete ALL beatmaps",
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
Action deletion = delegate
|
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(() =>
|
||||||
{
|
{
|
||||||
deleteButton.Enabled.Value = false;
|
deleteButton.Enabled.Value = false;
|
||||||
Task.Run(() => beatmaps.DeleteAll()).ContinueWith(t => Schedule(() => deleteButton.Enabled.Value = true));
|
Task.Run(() => beatmaps.DeleteAll()).ContinueWith(t => Schedule(() => deleteButton.Enabled.Value = true));
|
||||||
};
|
}));
|
||||||
dialogOverlay?.Push(new DeleteAllBeatmapsDialog(deletion));
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
restoreButton = new SettingsButton
|
restoreButton = new SettingsButton
|
||||||
|
Loading…
Reference in New Issue
Block a user