mirror of
https://github.com/ppy/osu
synced 2025-02-17 02:47:19 +00:00
46 lines
1.6 KiB
C#
46 lines
1.6 KiB
C#
|
// 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;
|
||
|
|
||
|
namespace osu.Game.Screens.Edit
|
||
|
{
|
||
|
public class CreateNewDifficultyDialog : PopupDialog
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Delegate used to create new difficulties.
|
||
|
/// A value of <see langword="true"/> in the <c>clearAllObjects</c> parameter
|
||
|
/// indicates that the new difficulty should have its hitobjects cleared;
|
||
|
/// otherwise, the new difficulty should be an exact copy of an existing one.
|
||
|
/// </summary>
|
||
|
public delegate void CreateNewDifficulty(bool clearAllObjects);
|
||
|
|
||
|
public CreateNewDifficultyDialog(CreateNewDifficulty createNewDifficulty)
|
||
|
{
|
||
|
HeaderText = "Would you like to clear all objects?";
|
||
|
|
||
|
Icon = FontAwesome.Regular.Clone;
|
||
|
|
||
|
Buttons = new PopupDialogButton[]
|
||
|
{
|
||
|
new PopupDialogOkButton
|
||
|
{
|
||
|
Text = "Yeah, let's start from scratch!",
|
||
|
Action = () => createNewDifficulty.Invoke(true)
|
||
|
},
|
||
|
new PopupDialogCancelButton
|
||
|
{
|
||
|
Text = "No, create an exact copy of this difficulty",
|
||
|
Action = () => createNewDifficulty.Invoke(false)
|
||
|
},
|
||
|
new PopupDialogCancelButton
|
||
|
{
|
||
|
Text = "I changed my mind, I want to keep editing this difficulty",
|
||
|
Action = () => { }
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
}
|
||
|
}
|