Make CreateRoomManager return the drawable version

This commit is contained in:
smoogipoo 2020-12-20 17:42:23 +09:00
parent d20eb368f5
commit 7c7f15089a
2 changed files with 6 additions and 5 deletions

View File

@ -46,7 +46,7 @@ namespace osu.Game.Screens.Multi
private readonly IBindable<bool> isIdle = new BindableBool();
[Cached(Type = typeof(IRoomManager))]
protected IRoomManager RoomManager { get; private set; }
protected RoomManager RoomManager { get; private set; }
[Cached]
private readonly Bindable<Room> selectedRoom = new Bindable<Room>();
@ -81,7 +81,7 @@ namespace osu.Game.Screens.Multi
InternalChild = waves = new MultiplayerWaveContainer
{
RelativeSizeAxes = Axes.Both,
Children = new[]
Children = new Drawable[]
{
new Box
{
@ -136,7 +136,7 @@ namespace osu.Game.Screens.Multi
Origin = Anchor.TopRight,
Action = () => CreateRoom()
},
(Drawable)(RoomManager = CreateRoomManager())
RoomManager = CreateRoomManager()
}
};
@ -353,7 +353,7 @@ namespace osu.Game.Screens.Multi
}
}
protected abstract IRoomManager CreateRoomManager();
protected abstract RoomManager CreateRoomManager();
private class MultiplayerWaveContainer : WaveContainer
{

View File

@ -3,6 +3,7 @@
using osu.Framework.Logging;
using osu.Framework.Screens;
using osu.Game.Screens.Multi.Components;
using osu.Game.Screens.Multi.Lounge;
using osu.Game.Screens.Multi.Match;
@ -43,6 +44,6 @@ namespace osu.Game.Screens.Multi.Timeshift
Logger.Log($"Polling adjusted (listing: {timeshiftManager.TimeBetweenListingPolls.Value}, selection: {timeshiftManager.TimeBetweenSelectionPolls.Value})");
}
protected override IRoomManager CreateRoomManager() => new TimeshiftRoomManager();
protected override RoomManager CreateRoomManager() => new TimeshiftRoomManager();
}
}