Add method for scaling results screen in tests

This commit is contained in:
Salman Ahmed 2022-05-08 16:00:07 +03:00
parent 569b73cf69
commit 077c77d524
2 changed files with 23 additions and 0 deletions

View File

@ -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)]

View File

@ -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()
{