2020-09-05 02:52:07 +08:00
|
|
|
// 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.
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
#nullable disable
|
|
|
|
|
2020-09-08 13:38:25 +08:00
|
|
|
using System;
|
2020-09-08 16:12:58 +08:00
|
|
|
using Humanizer;
|
2020-09-05 02:52:07 +08:00
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
namespace osu.Game.Collections
|
|
|
|
{
|
|
|
|
public class DeleteCollectionDialog : PopupDialog
|
|
|
|
{
|
2020-09-08 13:38:25 +08:00
|
|
|
public DeleteCollectionDialog(BeatmapCollection collection, Action deleteAction)
|
2020-09-05 02:52:07 +08:00
|
|
|
{
|
|
|
|
HeaderText = "Confirm deletion of";
|
2022-06-10 13:03:51 +08:00
|
|
|
BodyText = $"{collection.Name.Value} ({"beatmap".ToQuantity(collection.BeatmapHashes.Count)})";
|
2020-09-05 02:52:07 +08:00
|
|
|
|
|
|
|
Icon = FontAwesome.Regular.TrashAlt;
|
|
|
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
{
|
|
|
|
new PopupDialogOkButton
|
|
|
|
{
|
|
|
|
Text = @"Yes. Go for it.",
|
2020-09-08 13:38:25 +08:00
|
|
|
Action = deleteAction
|
2020-09-05 02:52:07 +08:00
|
|
|
},
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
|
|
|
Text = @"No! Abort mission!",
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|