-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Expand file tree
/
Copy pathBeatmapGroupDeleteDialog.cs
More file actions
32 lines (27 loc) · 944 Bytes
/
BeatmapGroupDeleteDialog.cs
File metadata and controls
32 lines (27 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Screens.Select
{
public partial class BeatmapGroupDeleteDialog : DeletionDialog
{
private readonly IReadOnlyList<BeatmapSetInfo> beatmapSets;
public BeatmapGroupDeleteDialog(GroupDefinition group, IReadOnlyList<BeatmapSetInfo> beatmapSets)
{
this.beatmapSets = beatmapSets;
BodyText = group.Title;
}
[BackgroundDependencyLoader]
private void load(BeatmapManager beatmapManager)
{
DangerousAction = () =>
{
foreach (var set in beatmapSets)
beatmapManager.Delete(set);
};
}
}
}