mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge pull request #17650 from CenTdemeern1/dangerous-delete-actions
Make several delete confirmation buttons dangerous buttons
This commit is contained in:
@ -172,11 +172,14 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
AddStep("click delete button", () =>
|
AddStep("click delete button", () =>
|
||||||
{
|
{
|
||||||
InputManager.MoveMouseTo(dialogOverlay.ChildrenOfType<DialogButton>().First());
|
InputManager.MoveMouseTo(dialogOverlay.ChildrenOfType<DialogButton>().First());
|
||||||
InputManager.Click(MouseButton.Left);
|
InputManager.PressButton(MouseButton.Left);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddUntilStep("wait for fetch", () => leaderboard.Scores != null);
|
AddUntilStep("wait for fetch", () => leaderboard.Scores != null);
|
||||||
AddUntilStep("score removed from leaderboard", () => leaderboard.Scores.All(s => s.OnlineID != scoreBeingDeleted.OnlineID));
|
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]
|
[Test]
|
||||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
HeaderText = @"Confirm deletion of";
|
HeaderText = @"Confirm deletion of";
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
{
|
{
|
||||||
new PopupDialogOkButton
|
new PopupDialogDangerousButton
|
||||||
{
|
{
|
||||||
Text = @"Yes. Go for it.",
|
Text = @"Yes. Go for it.",
|
||||||
Action = deleteAction
|
Action = deleteAction
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Screens.Select
|
|||||||
HeaderText = @"Confirm deletion of";
|
HeaderText = @"Confirm deletion of";
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
{
|
{
|
||||||
new PopupDialogOkButton
|
new PopupDialogDangerousButton
|
||||||
{
|
{
|
||||||
Text = @"Yes. Totally. Delete it.",
|
Text = @"Yes. Totally. Delete it.",
|
||||||
Action = () => manager?.Delete(beatmap),
|
Action = () => manager?.Delete(beatmap),
|
||||||
|
@ -38,7 +38,7 @@ namespace osu.Game.Screens.Select
|
|||||||
HeaderText = "Confirm deletion of local score";
|
HeaderText = "Confirm deletion of local score";
|
||||||
Buttons = new PopupDialogButton[]
|
Buttons = new PopupDialogButton[]
|
||||||
{
|
{
|
||||||
new PopupDialogOkButton
|
new PopupDialogDangerousButton
|
||||||
{
|
{
|
||||||
Text = "Yes. Please.",
|
Text = "Yes. Please.",
|
||||||
Action = () => scoreManager?.Delete(score)
|
Action = () => scoreManager?.Delete(score)
|
||||||
|
Reference in New Issue
Block a user