1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 18:02:55 +08:00
osu-lazer/osu.Game/Screens/Edit/PromptForSaveDialog.cs

40 lines
1.2 KiB
C#
Raw Normal View History

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