2020-02-14 19:42:14 +08:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2020-02-19 16:37:01 +08:00
|
|
|
using NUnit.Framework;
|
2020-02-14 19:42:14 +08:00
|
|
|
using osu.Framework.Graphics;
|
2020-07-09 17:55:10 +08:00
|
|
|
using osu.Game.Online.Multiplayer;
|
2020-02-19 16:33:09 +08:00
|
|
|
using osu.Game.Screens.Multi.Components;
|
2020-02-14 19:42:14 +08:00
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
|
|
|
{
|
|
|
|
public class TestSceneOverlinedParticipants : MultiplayerTestScene
|
|
|
|
{
|
|
|
|
protected override bool UseOnlineAPI => true;
|
|
|
|
|
2020-07-09 17:55:10 +08:00
|
|
|
[SetUp]
|
|
|
|
public void Setup() => Schedule(() =>
|
2020-02-14 19:42:14 +08:00
|
|
|
{
|
2020-07-09 17:55:10 +08:00
|
|
|
Room = new Room { RoomID = { Value = 7 } };
|
|
|
|
});
|
2020-02-14 19:42:14 +08:00
|
|
|
|
2020-02-19 16:37:01 +08:00
|
|
|
[Test]
|
|
|
|
public void TestHorizontalLayout()
|
|
|
|
{
|
|
|
|
AddStep("create component", () =>
|
|
|
|
{
|
2020-07-07 18:23:11 +08:00
|
|
|
Child = new ParticipantsDisplay(Direction.Horizontal)
|
2020-02-19 16:37:01 +08:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Width = 500,
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
public void TestVerticalLayout()
|
|
|
|
{
|
|
|
|
AddStep("create component", () =>
|
2020-02-14 19:42:14 +08:00
|
|
|
{
|
2020-07-07 18:23:11 +08:00
|
|
|
Child = new ParticipantsDisplay(Direction.Vertical)
|
2020-02-19 16:37:01 +08:00
|
|
|
{
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
Size = new Vector2(500)
|
|
|
|
};
|
2020-02-14 19:42:14 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|