1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 18:42:56 +08:00

Fix room host not being set

This commit is contained in:
smoogipoo 2018-12-04 17:23:58 +09:00
parent 6e5716c3f3
commit f2a57ce270
3 changed files with 22 additions and 2 deletions

View File

@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual
MaxParticipants = { Value = 10 },
};
Add(overlay = new TestRoomSettingsOverlay(room)
Add(overlay = new TestRoomSettingsOverlay
{
RelativeSizeAxes = Axes.Both,
Height = 0.75f,

View File

@ -0,0 +1,20 @@
// 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;
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;
}
}
}

View File

@ -71,7 +71,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
new Container
{
RelativeSizeAxes = Axes.Both,
Child = settings = new RoomSettingsOverlay
Child = settings = new CreateRoomOverlay
{
RelativeSizeAxes = Axes.Both,
Height = 0.9f,