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.
|
|
|
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Game.Overlays.Dialog;
|
2023-01-15 06:49:54 +08:00
|
|
|
using osu.Game.Localisation;
|
2022-02-07 00:52:59 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class CreateNewDifficultyDialog : PopupDialog
|
2022-02-07 00:52:59 +08:00
|
|
|
{
|
|
|
|
/// <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)
|
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
HeaderText = EditorDialogsStrings.NewDifficultyDialogHeader;
|
2022-02-07 00:52:59 +08:00
|
|
|
|
|
|
|
Icon = FontAwesome.Regular.Clone;
|
|
|
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
{
|
|
|
|
new PopupDialogOkButton
|
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.CreateNew,
|
2022-02-15 03:56:05 +08:00
|
|
|
Action = () => createNewDifficulty.Invoke(false)
|
2022-02-07 00:52:59 +08:00
|
|
|
},
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.CreateCopy,
|
2022-02-15 03:56:05 +08:00
|
|
|
Action = () => createNewDifficulty.Invoke(true)
|
2022-02-07 00:52:59 +08:00
|
|
|
},
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.KeepEditing,
|
2022-02-07 00:52:59 +08:00
|
|
|
Action = () => { }
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|