// Copyright (c) 2007-2018 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; using osu.Framework.Configuration; using osu.Framework.Graphics; using osu.Game.Online.API; using osu.Game.Online.Multiplayer; namespace osu.Game.Screens.Multi { public class RoomManager : Component { public IBindableCollection Rooms => rooms; private readonly BindableCollection rooms = new BindableCollection(); public readonly Bindable Current = new Bindable(); [Resolved] private APIAccess api { get; set; } public void CreateRoom(Room room) { room.Host.Value = api.LocalUser; // Todo: Perform API request rooms.Add(room); } } }