2019-01-24 17:43:03 +09: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.
|
2018-05-15 20:34:14 -03:00
|
|
|
|
|
2022-06-17 16:37:17 +09:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2018-05-15 20:34:14 -03:00
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Graphics;
|
2019-01-23 20:52:00 +09:00
|
|
|
|
using osu.Framework.Screens;
|
2018-12-22 14:29:27 +09:00
|
|
|
|
using osu.Game.Screens;
|
2020-12-25 16:50:00 +01:00
|
|
|
|
using osu.Game.Screens.OnlinePlay;
|
2018-05-15 20:34:14 -03:00
|
|
|
|
|
2019-03-25 01:02:36 +09:00
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
2018-05-15 20:34:14 -03:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2019-05-14 22:37:25 +03:00
|
|
|
|
public class TestSceneMultiHeader : OsuTestScene
|
2018-05-15 20:34:14 -03:00
|
|
|
|
{
|
2019-05-14 22:37:25 +03:00
|
|
|
|
public TestSceneMultiHeader()
|
2018-05-15 20:34:14 -03:00
|
|
|
|
{
|
2018-12-22 14:29:27 +09:00
|
|
|
|
int index = 0;
|
|
|
|
|
|
2020-01-31 19:10:44 +09:00
|
|
|
|
OsuScreenStack screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
|
|
|
|
|
|
2020-12-25 17:05:29 +01:00
|
|
|
|
screenStack.Push(new TestOnlinePlaySubScreen(index));
|
2018-12-22 14:29:27 +09:00
|
|
|
|
|
2018-05-15 20:34:14 -03:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2019-01-23 20:52:00 +09:00
|
|
|
|
screenStack,
|
2020-12-24 16:18:35 +01:00
|
|
|
|
new Header("Multiplayer", screenStack)
|
2018-05-15 20:34:14 -03:00
|
|
|
|
};
|
2018-12-22 14:29:27 +09:00
|
|
|
|
|
2020-12-25 17:05:29 +01:00
|
|
|
|
AddStep("push multi screen", () => screenStack.CurrentScreen.Push(new TestOnlinePlaySubScreen(++index)));
|
2018-12-22 14:29:27 +09:00
|
|
|
|
}
|
|
|
|
|
|
2020-12-25 17:05:29 +01:00
|
|
|
|
private class TestOnlinePlaySubScreen : OsuScreen, IOnlinePlaySubScreen
|
2018-12-22 14:29:27 +09:00
|
|
|
|
{
|
|
|
|
|
private readonly int index;
|
|
|
|
|
|
|
|
|
|
public string ShortTitle => $"Screen {index}";
|
|
|
|
|
|
2020-12-25 17:05:29 +01:00
|
|
|
|
public TestOnlinePlaySubScreen(int index)
|
2018-12-22 14:29:27 +09:00
|
|
|
|
{
|
|
|
|
|
this.index = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string ToString() => ShortTitle;
|
2018-05-15 20:34:14 -03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|