2020-09-09 10:31:18 +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;
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
|
|
|
public class PromptForSaveDialog : PopupDialog
|
|
|
|
{
|
2021-09-05 17:11:46 +00:00
|
|
|
public PromptForSaveDialog(Action exit, Action saveAndExit, Action cancel)
|
2020-09-09 10:31:18 +00:00
|
|
|
{
|
|
|
|
HeaderText = "Did you want to save your changes?";
|
|
|
|
|
|
|
|
Icon = FontAwesome.Regular.Save;
|
|
|
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
{
|
2022-03-21 07:06:58 +00:00
|
|
|
new PopupDialogOkButton
|
2020-09-09 10:31:18 +00:00
|
|
|
{
|
|
|
|
Text = @"Save my masterpiece!",
|
|
|
|
Action = saveAndExit
|
|
|
|
},
|
2022-03-21 07:06:58 +00:00
|
|
|
new PopupDialogDangerousButton
|
2020-09-09 10:31:18 +00:00
|
|
|
{
|
|
|
|
Text = @"Forget all changes",
|
|
|
|
Action = exit
|
|
|
|
},
|
2020-09-09 11:00:38 +00:00
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
|
|
|
Text = @"Oops, continue editing",
|
2021-09-05 17:11:46 +00:00
|
|
|
Action = cancel
|
2020-09-09 11:00:38 +00:00
|
|
|
},
|
2020-09-09 10:31:18 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|