forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add confirmation dialog for Clear All button in TournamentEditorScreen
- Loading branch information
Showing
6 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
osu.Game.Tournament.Tests/Screens/TestSceneRoundEditorScreen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
osu.Game.Tournament.Tests/Screens/TestSceneTeamEditorScreen.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
osu.Game.Tournament/Screens/Editors/Components/TournamentClearAllDialog.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// 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.Collections; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Game.Overlays.Dialog; | ||
|
||
namespace osu.Game.Tournament.Screens.Editors.Components | ||
{ | ||
public partial class TournamentClearAllDialog : DangerousActionDialog | ||
|
||
{ | ||
public TournamentClearAllDialog(IList storage) | ||
{ | ||
HeaderText = @"Confirm clear all?"; | ||
Icon = FontAwesome.Solid.Trash; | ||
DangerousAction = storage.Clear; | ||
} | ||
|
||
// // 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.Graphics.Containers; | ||
// using osu.Framework.Graphics.Sprites; | ||
// using osu.Game.Overlays.Dialog; | ||
// using osu.Game.Tournament.Screens.Ladder.Components; | ||
// | ||
// namespace osu.Game.Tournament.Screens.Editors.Components | ||
// { | ||
// public partial class LadderResetTeamsDialog : DangerousActionDialog | ||
// { | ||
// public LadderResetTeamsDialog(Container<DrawableTournamentMatch> matchesContainer) | ||
// { | ||
// HeaderText = @"Confirm reset teams?"; | ||
// Icon = FontAwesome.Solid.Undo; | ||
// DangerousAction = () => | ||
// { | ||
// foreach (var p in matchesContainer) | ||
// p.Match.Reset(); | ||
// }; | ||
// } | ||
// } | ||
// } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters