2020-09-09 18:31:18 +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 System;
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
using osu.Game.Overlays.Dialog;
|
2023-01-15 06:49:54 +08:00
|
|
|
using osu.Game.Localisation;
|
2020-09-09 18:31:18 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Edit
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
public partial class PromptForSaveDialog : PopupDialog
|
2020-09-09 18:31:18 +08:00
|
|
|
{
|
2021-09-06 01:11:46 +08:00
|
|
|
public PromptForSaveDialog(Action exit, Action saveAndExit, Action cancel)
|
2020-09-09 18:31:18 +08:00
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
HeaderText = EditorDialogsStrings.SaveDialogHeader;
|
2020-09-09 18:31:18 +08:00
|
|
|
|
|
|
|
Icon = FontAwesome.Regular.Save;
|
|
|
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
{
|
2022-03-21 15:06:58 +08:00
|
|
|
new PopupDialogOkButton
|
2020-09-09 18:31:18 +08:00
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.Save,
|
2020-09-09 18:31:18 +08:00
|
|
|
Action = saveAndExit
|
|
|
|
},
|
2022-03-21 15:06:58 +08:00
|
|
|
new PopupDialogDangerousButton
|
2020-09-09 18:31:18 +08:00
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.ForgetAllChanges,
|
2020-09-09 18:31:18 +08:00
|
|
|
Action = exit
|
|
|
|
},
|
2020-09-09 19:00:38 +08:00
|
|
|
new PopupDialogCancelButton
|
|
|
|
{
|
2023-01-15 06:49:54 +08:00
|
|
|
Text = EditorDialogsStrings.ContinueEditing,
|
2021-09-06 01:11:46 +08:00
|
|
|
Action = cancel
|
2020-09-09 19:00:38 +08:00
|
|
|
},
|
2020-09-09 18:31:18 +08:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|