1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 11:03:22 +08:00
osu-lazer/osu.Game/Screens/Edit/PromptForSaveDialog.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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
{
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
},
};
}
}
}