mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
Fix room host not being set
This commit is contained in:
parent
6e5716c3f3
commit
f2a57ce270
@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
MaxParticipants = { Value = 10 },
|
MaxParticipants = { Value = 10 },
|
||||||
};
|
};
|
||||||
|
|
||||||
Add(overlay = new TestRoomSettingsOverlay(room)
|
Add(overlay = new TestRoomSettingsOverlay
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.75f,
|
Height = 0.75f,
|
||||||
|
20
osu.Game/Screens/Multi/Components/CreateRoomOverlay.cs
Normal file
20
osu.Game/Screens/Multi/Components/CreateRoomOverlay.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
|
|||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = settings = new RoomSettingsOverlay
|
Child = settings = new CreateRoomOverlay
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.9f,
|
Height = 0.9f,
|
||||||
|
Loading…
Reference in New Issue
Block a user