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;
|
2020-12-25 23:50:00 +08:00
|
|
|
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());
|
|
|
|
|
2021-01-10 04:38:20 +08:00
|
|
|
[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;
|
|
|
|
|
|
|
|
AddRangeInternal(new Drawable[]
|
|
|
|
{
|
2020-12-25 12:38:11 +08:00
|
|
|
Client = new TestMultiplayerClient(),
|
|
|
|
RoomManager = new TestMultiplayerRoomManager(),
|
2021-01-10 04:38:20 +08:00
|
|
|
OngoingOperationTracker = new OngoingOperationTracker(),
|
2020-12-19 00:19:08 +08:00
|
|
|
content = new Container { RelativeSizeAxes = Axes.Both }
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|