mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +08:00
Add method for scaling results screen in tests
This commit is contained in:
parent
569b73cf69
commit
077c77d524
@ -8,11 +8,23 @@ using osu.Game.Online.Rooms;
|
|||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
using osu.Game.Screens.OnlinePlay.Multiplayer;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Multiplayer
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestSceneMultiplayerTeamResults : ScreenTestScene
|
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(7483253, 1048576)]
|
||||||
[TestCase(1048576, 7483253)]
|
[TestCase(1048576, 7483253)]
|
||||||
[TestCase(1048576, 1048576)]
|
[TestCase(1048576, 1048576)]
|
||||||
|
@ -56,6 +56,17 @@ namespace osu.Game.Tests.Visual.Ranking
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[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]
|
[Test]
|
||||||
public void TestResultsWithoutPlayer()
|
public void TestResultsWithoutPlayer()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user