mirror of
https://github.com/ppy/osu
synced 2024-12-27 17:32:56 +00:00
49 lines
1.3 KiB
C#
49 lines
1.3 KiB
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using NUnit.Framework;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Screens;
|
|
using osu.Game.Screens;
|
|
using osu.Game.Screens.OnlinePlay;
|
|
|
|
namespace osu.Game.Tests.Visual.Multiplayer
|
|
{
|
|
[TestFixture]
|
|
public class TestSceneMultiHeader : OsuTestScene
|
|
{
|
|
public TestSceneMultiHeader()
|
|
{
|
|
int index = 0;
|
|
|
|
OsuScreenStack screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
|
|
|
|
screenStack.Push(new TestOnlinePlaySubScreen(index));
|
|
|
|
Children = new Drawable[]
|
|
{
|
|
screenStack,
|
|
new Header("Multiplayer", screenStack)
|
|
};
|
|
|
|
AddStep("push multi screen", () => screenStack.CurrentScreen.Push(new TestOnlinePlaySubScreen(++index)));
|
|
}
|
|
|
|
private class TestOnlinePlaySubScreen : OsuScreen, IOnlinePlaySubScreen
|
|
{
|
|
private readonly int index;
|
|
|
|
public string ShortTitle => $"Screen {index}";
|
|
|
|
public TestOnlinePlaySubScreen(int index)
|
|
{
|
|
this.index = index;
|
|
}
|
|
|
|
public override string ToString() => ShortTitle;
|
|
}
|
|
}
|
|
}
|