2022-02-07 00:52:59 +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
|
|
|
|
|
2022-02-07 00:52:59 +08:00
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
|
|
|
public partial class CreateNewDifficultyDialog : PopupDialog
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Delegate used to create new difficulties.
|
2022-02-15 03:56:05 +08:00
|
|
|
/// A value of <see langword="true"/> in the <c>createCopy</c> parameter
|
|
|
|
/// indicates that the new difficulty should be an exact copy of an existing one;
|
|
|
|
/// otherwise, the new difficulty should have its hitobjects and beatmap-level settings cleared.
|
2022-02-07 00:52:59 +08:00
|
|
|
/// </summary>
|
2022-02-15 03:56:05 +08:00
|
|
|
public delegate void CreateNewDifficulty(bool createCopy);
|
2022-02-07 00:52:59 +08:00
|
|
|
|
|
|
|
public CreateNewDifficultyDialog(CreateNewDifficulty createNewDifficulty)
|
|
|
|
{
|
2022-02-07 02:51:02 +08:00
|
|
|
HeaderText = "Would you like to create a blank difficulty?";
|
2022-02-07 00:52:59 +08:00
|
|
|
|
|
|
|
Icon = FontAwesome.Regular.Clone;
|
|
|
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
{
|
|
|
|
new PopupDialogOkButton
|
|
|
|
{
|
|
|
|
Text = "Yeah, let's start from scratch!",
|
2022-02-15 03:56:05 +08:00
|
|
|
Action = () => createNewDifficulty.Invoke(false)
|
2022-02-07 00:52:59 +08:00
|
|
|
},
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
|
|
|
Text = "No, create an exact copy of this difficulty",
|
2022-02-15 03:56:05 +08:00
|
|
|
Action = () => createNewDifficulty.Invoke(true)
|
2022-02-07 00:52:59 +08:00
|
|
|
},
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
|
|
|
Text = "I changed my mind, I want to keep editing this difficulty",
|
|
|
|
Action = () => { }
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|