1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 10:27:35 +08:00
osu-lazer/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerRoomContainer.cs

49 lines
1.6 KiB
C#
Raw Normal View History

2020-12-19 00:19:08 +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.
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
2020-12-25 12:38:11 +08:00
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.OnlinePlay;
using osu.Game.Screens.OnlinePlay.Lounge.Components;
2020-12-19 00:19:08 +08:00
2020-12-25 12:38:11 +08:00
namespace osu.Game.Tests.Visual.Multiplayer
2020-12-19 00:19:08 +08:00
{
2020-12-25 12:38:11 +08:00
public class TestMultiplayerRoomContainer : Container
2020-12-19 00:19:08 +08:00
{
protected override Container<Drawable> Content => content;
private readonly Container content;
[Cached(typeof(StatefulMultiplayerClient))]
2020-12-25 12:38:11 +08:00
public readonly TestMultiplayerClient Client;
2020-12-19 00:19:08 +08:00
2020-12-21 17:42:23 +08:00
[Cached(typeof(IRoomManager))]
2020-12-25 12:38:11 +08:00
public readonly TestMultiplayerRoomManager RoomManager;
2020-12-19 00:19:08 +08:00
[Cached]
public readonly Bindable<FilterCriteria> Filter = new Bindable<FilterCriteria>(new FilterCriteria());
[Cached]
public readonly OngoingOperationTracker OngoingOperationTracker;
2020-12-25 12:38:11 +08:00
public TestMultiplayerRoomContainer()
2020-12-19 00:19:08 +08:00
{
RelativeSizeAxes = Axes.Both;
2021-03-03 18:40:19 +08:00
RoomManager = new TestMultiplayerRoomManager();
Client = new TestMultiplayerClient(RoomManager);
OngoingOperationTracker = new OngoingOperationTracker();
2020-12-19 00:19:08 +08:00
AddRangeInternal(new Drawable[]
{
2021-03-03 18:40:19 +08:00
Client,
RoomManager,
OngoingOperationTracker,
2020-12-19 00:19:08 +08:00
content = new Container { RelativeSizeAxes = Axes.Both }
});
}
}
}