1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Testing build

This commit is contained in:
DrabWeb 2017-02-28 17:09:31 -04:00
parent ce1798b8bc
commit d5d8352b62
2 changed files with 10 additions and 10 deletions

View File

@ -9,20 +9,20 @@ using osu.Game.Overlays.Dialog;
namespace osu.Desktop.VisualTests.Tests namespace osu.Desktop.VisualTests.Tests
{ {
public class TestCaseDialogOverlay : TestCase class TestCaseDialogOverlay : TestCase
{ {
public override string Name => @"Dialog Overlay"; public override string Name => @"Dialog Overlay";
public override string Description => @"Display dialogs"; public override string Description => @"Display dialogs";
DialogOverlay overlay;
public override void Reset() public override void Reset()
{ {
base.Reset(); base.Reset();
var manager = new DialogOverlay(); Add(overlay = new DialogOverlay());
Add(manager);
AddButton("dialog #1", () => manager.Push(new PopupDialog AddButton("dialog #1", () => overlay.Push(new PopupDialog
{ {
Icon = FontAwesome.fa_trash_o, Icon = FontAwesome.fa_trash_o,
HeaderText = @"Confirm deletion of", HeaderText = @"Confirm deletion of",
@ -42,7 +42,7 @@ namespace osu.Desktop.VisualTests.Tests
}, },
})); }));
AddButton("dialog #2", () => manager.Push(new PopupDialog AddButton("dialog #2", () => overlay.Push(new PopupDialog
{ {
Icon = FontAwesome.fa_gear, Icon = FontAwesome.fa_gear,
HeaderText = @"What do you want to do with", HeaderText = @"What do you want to do with",

View File

@ -59,8 +59,8 @@ namespace osu.Game.Screens.Select
FilterControl filter; FilterControl filter;
[BackgroundDependencyLoader(permitNulls: true)] [BackgroundDependencyLoader(permitNulls: true)]
private void load(BeatmapDatabase beatmaps, AudioManager audio, Framework.Game game, private void load(BeatmapDatabase beatmaps, AudioManager audio, /*DialogOverlay dialog,*/ Framework.Game game,
OsuGame osuGame, DialogOverlay dialog, OsuColour colours) OsuGame osuGame, OsuColour colours)
{ {
const float carousel_width = 640; const float carousel_width = 640;
const float filter_height = 100; const float filter_height = 100;
@ -144,7 +144,7 @@ namespace osu.Game.Screens.Select
database.BeatmapSetRemoved += onBeatmapSetRemoved; database.BeatmapSetRemoved += onBeatmapSetRemoved;
trackManager = audio.Track; trackManager = audio.Track;
dialogOverlay = dialog; //dialogOverlay = dialog;
sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty"); sampleChangeDifficulty = audio.Sample.Get(@"SongSelect/select-difficulty");
sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand"); sampleChangeBeatmap = audio.Sample.Get(@"SongSelect/select-expand");
@ -388,7 +388,7 @@ namespace osu.Game.Screens.Select
if (state.Keyboard.ShiftPressed) if (state.Keyboard.ShiftPressed)
{ {
if (Beatmap != null) if (Beatmap != null)
dialogOverlay.Push(new BeatmapDeleteDialog(Beatmap)); dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
return true; return true;
} }