mirror of https://github.com/ppy/osu
Add method for scaling results screen in tests
This commit is contained in:
parent
569b73cf69
commit
077c77d524
|
@ -8,11 +8,23 @@
|
|||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||
using osu.Game.Tests.Resources;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Tests.Visual.Multiplayer
|
||||
{
|
||||
public class TestSceneMultiplayerTeamResults : ScreenTestScene
|
||||
{
|
||||
[Test]
|
||||
public void TestScaling()
|
||||
{
|
||||
// scheduling is needed as scaling the content immediately causes the entire scene to shake badly, for some odd reason.
|
||||
AddSliderStep("scale", 0.5f, 1.6f, 1f, v => Schedule(() =>
|
||||
{
|
||||
Stack.Scale = new Vector2(v);
|
||||
Stack.Size = new Vector2(1f / v);
|
||||
}));
|
||||
}
|
||||
|
||||
[TestCase(7483253, 1048576)]
|
||||
[TestCase(1048576, 7483253)]
|
||||
[TestCase(1048576, 1048576)]
|
||||
|
|
|
@ -56,6 +56,17 @@ protected override void LoadComplete()
|
|||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestScaling()
|
||||
{
|
||||
// scheduling is needed as scaling the content immediately causes the entire scene to shake badly, for some odd reason.
|
||||
AddSliderStep("scale", 0.5f, 1.6f, 1f, v => Schedule(() =>
|
||||
{
|
||||
Content.Scale = new Vector2(v);
|
||||
Content.Size = new Vector2(1f / v);
|
||||
}));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResultsWithoutPlayer()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue