2018-12-04 08:23:58 +00:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Game.Online.API;
|
2018-12-04 09:18:17 +00:00
|
|
|
using osu.Game.Online.Multiplayer;
|
2018-12-04 08:23:58 +00:00
|
|
|
|
|
|
|
namespace osu.Game.Screens.Multi.Components
|
|
|
|
{
|
|
|
|
public class CreateRoomOverlay : RoomSettingsOverlay
|
|
|
|
{
|
|
|
|
[Resolved]
|
|
|
|
private APIAccess api { get; set; }
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load()
|
|
|
|
{
|
|
|
|
Room.Host.Value = api.LocalUser;
|
|
|
|
}
|
2018-12-04 09:18:17 +00:00
|
|
|
|
|
|
|
public override Room Room
|
|
|
|
{
|
|
|
|
get => base.Room;
|
|
|
|
set
|
|
|
|
{
|
|
|
|
base.Room = value;
|
|
|
|
|
|
|
|
if (api != null && value != null)
|
|
|
|
value.Host.Value = api.LocalUser;
|
|
|
|
}
|
|
|
|
}
|
2018-12-04 08:23:58 +00:00
|
|
|
}
|
|
|
|
}
|