1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:47:24 +08:00

Merge pull request #17650 from CenTdemeern1/dangerous-delete-actions

Make several delete confirmation buttons dangerous buttons
This commit is contained in:
Dean Herbert 2022-04-05 14:14:00 +09:00 committed by GitHub
commit 55752c2693
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 4 deletions

View File

@ -172,11 +172,14 @@ namespace osu.Game.Tests.Visual.UserInterface
AddStep("click delete button", () =>
{
InputManager.MoveMouseTo(dialogOverlay.ChildrenOfType<DialogButton>().First());
InputManager.Click(MouseButton.Left);
InputManager.PressButton(MouseButton.Left);
});
AddUntilStep("wait for fetch", () => leaderboard.Scores != null);
AddUntilStep("score removed from leaderboard", () => leaderboard.Scores.All(s => s.OnlineID != scoreBeingDeleted.OnlineID));
// "Clean up"
AddStep("release left mouse button", () => InputManager.ReleaseButton(MouseButton.Left));
}
[Test]

View File

@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
HeaderText = @"Confirm deletion of";
Buttons = new PopupDialogButton[]
{
new PopupDialogOkButton
new PopupDialogDangerousButton
{
Text = @"Yes. Go for it.",
Action = deleteAction

View File

@ -26,7 +26,7 @@ namespace osu.Game.Screens.Select
HeaderText = @"Confirm deletion of";
Buttons = new PopupDialogButton[]
{
new PopupDialogOkButton
new PopupDialogDangerousButton
{
Text = @"Yes. Totally. Delete it.",
Action = () => manager?.Delete(beatmap),

View File

@ -38,7 +38,7 @@ namespace osu.Game.Screens.Select
HeaderText = "Confirm deletion of local score";
Buttons = new PopupDialogButton[]
{
new PopupDialogOkButton
new PopupDialogDangerousButton
{
Text = "Yes. Please.",
Action = () => scoreManager?.Delete(score)