1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-02 02:29:54 +08:00

Merge pull request #31780 from necocat0918/pr

Added warning before bookmark reset
This commit is contained in:
Dean Herbert
2025-02-05 16:02:44 +09:00
committed by GitHub
Unverified
2 changed files with 27 additions and 1 deletions
@@ -0,0 +1,26 @@
// 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.Allocation;
using osu.Game.Overlays.Dialog;
namespace osu.Game.Screens.Edit
{
public partial class BookmarkResetDialog : DeletionDialog
{
private readonly EditorBeatmap editor;
public BookmarkResetDialog(EditorBeatmap editorBeatmap)
{
editor = editorBeatmap;
BodyText = "All Bookmarks";
}
[BackgroundDependencyLoader]
private void load()
{
DangerousAction = () => editor.Bookmarks.Clear();
}
}
}
+1 -1
View File
@@ -462,7 +462,7 @@ namespace osu.Game.Screens.Edit
{
Hotkey = new Hotkey(GlobalAction.EditorSeekToNextBookmark)
},
new EditorMenuItem(EditorStrings.ResetBookmarks, MenuItemType.Destructive, () => editorBeatmap.Bookmarks.Clear())
new EditorMenuItem(EditorStrings.ResetBookmarks, MenuItemType.Destructive, () => dialogOverlay?.Push(new BookmarkResetDialog(editorBeatmap)))
}
}
}