2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-09-18 21:32:49 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2018-03-02 14:34:31 +08:00
|
|
|
|
using NUnit.Framework;
|
2017-09-18 21:32:49 +08:00
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Overlays;
|
|
|
|
|
using osu.Game.Overlays.Dialog;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual
|
|
|
|
|
{
|
2018-03-02 14:34:31 +08:00
|
|
|
|
[TestFixture]
|
2017-12-20 20:47:45 +08:00
|
|
|
|
public class TestCaseDialogOverlay : OsuTestCase
|
2017-09-18 21:32:49 +08:00
|
|
|
|
{
|
|
|
|
|
public TestCaseDialogOverlay()
|
|
|
|
|
{
|
|
|
|
|
DialogOverlay overlay;
|
|
|
|
|
|
|
|
|
|
Add(overlay = new DialogOverlay());
|
|
|
|
|
|
|
|
|
|
AddStep("dialog #1", () => overlay.Push(new PopupDialog
|
|
|
|
|
{
|
|
|
|
|
Icon = FontAwesome.fa_trash_o,
|
|
|
|
|
HeaderText = @"Confirm deletion of",
|
|
|
|
|
BodyText = @"Ayase Rie - Yuima-ru*World TVver.",
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
|
{
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"I never want to see this again.",
|
|
|
|
|
Action = () => System.Console.WriteLine(@"OK"),
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Firetruck, I still want quick ranks!",
|
|
|
|
|
Action = () => System.Console.WriteLine(@"Cancel"),
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
AddStep("dialog #2", () => overlay.Push(new PopupDialog
|
|
|
|
|
{
|
|
|
|
|
Icon = FontAwesome.fa_gear,
|
|
|
|
|
HeaderText = @"What do you want to do with",
|
|
|
|
|
BodyText = "Camellia as \"Bang Riot\" - Blastix Riotz",
|
|
|
|
|
Buttons = new PopupDialogButton[]
|
|
|
|
|
{
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Manage collections",
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Delete...",
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Remove from unplayed",
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Clear local scores",
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogOkButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Edit",
|
|
|
|
|
},
|
|
|
|
|
new PopupDialogCancelButton
|
|
|
|
|
{
|
|
|
|
|
Text = @"Cancel",
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|