1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:52:55 +08:00

Change intro test to test full intro screen

This commit is contained in:
Dean Herbert 2019-07-06 19:05:12 +09:00
parent 8aac0ab0ce
commit 58183ad3d5

View File

@ -4,10 +4,12 @@
using System;
using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Timing;
using osu.Game.Screens;
using osu.Game.Screens.Menu;
using osuTK.Graphics;
@ -19,12 +21,16 @@ namespace osu.Game.Tests.Visual.Menus
public override IReadOnlyList<Type> RequiredTypes => new[]
{
typeof(OsuLogo),
typeof(Intro),
typeof(StartupScreen),
typeof(OsuScreen)
};
[Cached]
private OsuLogo logo;
public TestSceneIntroSequence()
{
OsuLogo logo;
var rateAdjustClock = new StopwatchClock(true);
var framedClock = new FramedClock(rateAdjustClock);
framedClock.ProcessFrame();
@ -40,14 +46,17 @@ namespace osu.Game.Tests.Visual.Menus
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black,
},
new OsuScreenStack(new Intro())
{
RelativeSizeAxes = Axes.Both,
},
logo = new OsuLogo
{
Anchor = Anchor.Centre,
}
},
}
});
AddStep(@"Restart", logo.PlayIntro);
AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v);
}
}