mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 10:33:07 +08:00
Edited pause visual test
This commit is contained in:
parent
91e18cc63e
commit
1c166bdf32
@ -1,17 +1,19 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Screens.Testing;
|
||||
using osu.Game.Screens.Play;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
internal class TestCasePauseOverlay : TestCase
|
||||
internal class TestCaseInGameOverlays : TestCase
|
||||
{
|
||||
public override string Description => @"Tests the pause overlay";
|
||||
public override string Description => @"Tests the pause and fail overlays";
|
||||
|
||||
private PauseOverlay pauseOverlay;
|
||||
private FailOverlay failOverlay;
|
||||
private int retryCount;
|
||||
|
||||
public override void Reset()
|
||||
@ -27,12 +29,34 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Title = @"paused",
|
||||
Description = @"you're not going to do what i think you're going to do, are ya?",
|
||||
});
|
||||
Add(failOverlay = new FailOverlay
|
||||
{
|
||||
Depth = -1,
|
||||
OnRetry = () => Logger.Log(@"Retry"),
|
||||
OnQuit = () => Logger.Log(@"Quit"),
|
||||
Title = @"failed",
|
||||
Description = @"you're dead, try again?",
|
||||
});
|
||||
|
||||
AddButton("Pause", pauseOverlay.Show);
|
||||
AddButton("Pause", delegate {
|
||||
if(failOverlay.State == Visibility.Visible)
|
||||
{
|
||||
failOverlay.Hide();
|
||||
}
|
||||
pauseOverlay.Show();
|
||||
});
|
||||
AddButton("Fail", delegate {
|
||||
if (pauseOverlay.State == Visibility.Visible)
|
||||
{
|
||||
pauseOverlay.Hide();
|
||||
}
|
||||
failOverlay.Show();
|
||||
});
|
||||
AddButton("Add Retry", delegate
|
||||
{
|
||||
retryCount++;
|
||||
pauseOverlay.Retries = retryCount;
|
||||
failOverlay.Retries = retryCount;
|
||||
});
|
||||
|
||||
retryCount = 0;
|
@ -185,6 +185,7 @@
|
||||
<Compile Include="Tests\TestCaseChatDisplay.cs" />
|
||||
<Compile Include="Tests\TestCaseDrawings.cs" />
|
||||
<Compile Include="Tests\TestCaseGamefield.cs" />
|
||||
<Compile Include="Tests\TestCaseInGameOverlays.cs" />
|
||||
<Compile Include="Tests\TestCaseMusicController.cs" />
|
||||
<Compile Include="Tests\TestCaseNotificationManager.cs" />
|
||||
<Compile Include="Tests\TestCasePlayer.cs" />
|
||||
@ -202,7 +203,6 @@
|
||||
<Compile Include="VisualTestGame.cs" />
|
||||
<Compile Include="Platform\TestStorage.cs" />
|
||||
<Compile Include="Tests\TestCaseOptions.cs" />
|
||||
<Compile Include="Tests\TestCasePauseOverlay.cs" />
|
||||
<Compile Include="Tests\TestCaseModSelectOverlay.cs" />
|
||||
<Compile Include="Tests\TestCaseDialogOverlay.cs" />
|
||||
<Compile Include="Tests\TestCaseBeatmapOptionsOverlay.cs" />
|
||||
@ -212,9 +212,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Folder Include="Beatmaps\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
Loading…
Reference in New Issue
Block a user