mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Added PauseOverlay.TogglePaused, renamed OnPlay and similar to OnResume, made Pause and Play public, added proper testing for the visual test(pause button instead of auto-pause, logging actions), made PauseOverlay's fade duration a constant instead of statically typed
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Game.Overlays.Pause;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using osu.Framework.GameModes.Testing;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
{
|
||||
class TestCasePauseOverlay : TestCase
|
||||
@ -27,7 +30,20 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
});
|
||||
Add(pauseOverlay = new PauseOverlay());
|
||||
|
||||
pauseOverlay.ToggleVisibility();
|
||||
}
|
||||
Add(new Button
|
||||
{
|
||||
Text = @"Pause",
|
||||
Anchor = Anchor.TopLeft,
|
||||
Origin = Anchor.TopLeft,
|
||||
Width = 100,
|
||||
Height = 50,
|
||||
Colour = Color4.Black,
|
||||
Action = (() => pauseOverlay.Pause())
|
||||
});
|
||||
|
||||
pauseOverlay.OnPause += (() => Logger.Log(@"Pause"));
|
||||
pauseOverlay.OnResume += (() => Logger.Log(@"Resume"));
|
||||
pauseOverlay.OnRetry += (() => Logger.Log(@"Retry"));
|
||||
pauseOverlay.OnQuit += (() => Logger.Log(@"Quit"));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user