osu/osu.Game/Collections/DeleteCollectionDialog.cs

35 lines
1.0 KiB
C#
Raw Normal View History

2020-09-04 18:52:07 +00: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.
using System;
2020-09-08 08:12:58 +00:00
using Humanizer;
2020-09-04 18:52:07 +00:00
using osu.Framework.Graphics.Sprites;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Collections
{
public class DeleteCollectionDialog : PopupDialog
{
public DeleteCollectionDialog(BeatmapCollection collection, Action deleteAction)
2020-09-04 18:52:07 +00:00
{
HeaderText = "Confirm deletion of";
2020-09-08 08:12:58 +00:00
BodyText = $"{collection.Name.Value} ({"beatmap".ToQuantity(collection.Beatmaps.Count)})";
2020-09-04 18:52:07 +00:00
Icon = FontAwesome.Regular.TrashAlt;
Buttons = new PopupDialogButton[]
{
new PopupDialogOkButton
{
Text = @"Yes. Go for it.",
Action = deleteAction
2020-09-04 18:52:07 +00:00
},
new PopupDialogCancelButton
{
Text = @"No! Abort mission!",
},
};
}
}
}