mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move create room button into the lounge
This commit is contained in:
@ -249,10 +249,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
|
|
||||||
private void createRoom(Func<Room> room)
|
private void createRoom(Func<Room> room)
|
||||||
{
|
{
|
||||||
AddStep("open room", () =>
|
AddUntilStep("wait for lounge", () => multiplayerScreen.ChildrenOfType<LoungeSubScreen>().SingleOrDefault()?.IsLoaded == true);
|
||||||
{
|
AddStep("open room", () => multiplayerScreen.ChildrenOfType<LoungeSubScreen>().Single().OpenNewRoom(room()));
|
||||||
multiplayerScreen.OpenNewRoom(room());
|
|
||||||
});
|
|
||||||
|
|
||||||
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
AddUntilStep("wait for room open", () => this.ChildrenOfType<MultiplayerMatchSubScreen>().FirstOrDefault()?.IsLoaded == true);
|
||||||
AddWaitStep("wait for transition", 2);
|
AddWaitStep("wait for transition", 2);
|
||||||
|
@ -16,6 +16,7 @@ using osu.Game.Overlays.Toolbar;
|
|||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
|
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
@ -316,7 +317,8 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
|
|
||||||
PushAndConfirm(() => multiplayer = new TestMultiplayer());
|
PushAndConfirm(() => multiplayer = new TestMultiplayer());
|
||||||
|
|
||||||
AddStep("open room", () => multiplayer.OpenNewRoom());
|
AddUntilStep("wait for lounge", () => multiplayer.ChildrenOfType<LoungeSubScreen>().SingleOrDefault()?.IsLoaded == true);
|
||||||
|
AddStep("open room", () => multiplayer.ChildrenOfType<LoungeSubScreen>().Single().OpenNewRoom());
|
||||||
AddStep("press back button", () => Game.ChildrenOfType<BackButton>().First().Action());
|
AddStep("press back button", () => Game.ChildrenOfType<BackButton>().First().Action());
|
||||||
AddWaitStep("wait two frames", 2);
|
AddWaitStep("wait two frames", 2);
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
private Drawable selectionBox;
|
private Drawable selectionBox;
|
||||||
|
|
||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OnlinePlayScreen parentScreen { get; set; }
|
private LoungeSubScreen loungeScreen { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private BeatmapManager beatmaps { get; set; }
|
private BeatmapManager beatmaps { get; set; }
|
||||||
@ -408,7 +408,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
{
|
{
|
||||||
new OsuMenuItem("Create copy", MenuItemType.Standard, () =>
|
new OsuMenuItem("Create copy", MenuItemType.Standard, () =>
|
||||||
{
|
{
|
||||||
parentScreen?.OpenNewRoom(Room.CreateCopy());
|
loungeScreen?.OpenNewRoom(Room.CreateCopy());
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,9 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
},
|
},
|
||||||
Filters = new FillFlowContainer
|
Filters = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(10),
|
Spacing = new Vector2(10),
|
||||||
Child = statusDropdown = new SlimEnumDropdown<RoomStatusFilter>
|
Child = statusDropdown = new SlimEnumDropdown<RoomStatusFilter>
|
||||||
|
@ -18,6 +18,7 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||||
using osu.Game.Screens.OnlinePlay.Match;
|
using osu.Game.Screens.OnlinePlay.Match;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.Lounge
|
namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||||
@ -29,11 +30,17 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
|
|
||||||
protected override UserActivity InitialActivity => new UserActivity.SearchingForLobby();
|
protected override UserActivity InitialActivity => new UserActivity.SearchingForLobby();
|
||||||
|
|
||||||
|
protected Container<OsuButton> Buttons { get; } = new Container<OsuButton>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
AutoSizeAxes = Axes.Both
|
||||||
|
};
|
||||||
|
|
||||||
private readonly IBindable<bool> initialRoomsReceived = new Bindable<bool>();
|
private readonly IBindable<bool> initialRoomsReceived = new Bindable<bool>();
|
||||||
private readonly IBindable<bool> operationInProgress = new Bindable<bool>();
|
private readonly IBindable<bool> operationInProgress = new Bindable<bool>();
|
||||||
|
|
||||||
private FilterControl filter;
|
private FilterControl filter;
|
||||||
private Container content;
|
|
||||||
private LoadingLayer loadingLayer;
|
private LoadingLayer loadingLayer;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
@ -63,7 +70,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.5f,
|
Alpha = 0.5f,
|
||||||
},
|
},
|
||||||
content = new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
@ -84,7 +91,21 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
filter = CreateFilterControl().With(d => d.Depth = -1),
|
new Container
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Height = 70,
|
||||||
|
Depth = -1,
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
filter = CreateFilterControl(),
|
||||||
|
Buttons.WithChild(CreateNewRoomButton().With(d =>
|
||||||
|
{
|
||||||
|
d.Size = new Vector2(150, 25);
|
||||||
|
d.Action = () => OpenNewRoom();
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
null,
|
null,
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
@ -216,6 +237,20 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
|
|
||||||
protected abstract FilterControl CreateFilterControl();
|
protected abstract FilterControl CreateFilterControl();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates and opens the newly-created room.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="room">An optional template to use when creating the room.</param>
|
||||||
|
public void OpenNewRoom(Room room = null) => Open(room ?? CreateNewRoom());
|
||||||
|
|
||||||
|
protected abstract OsuButton CreateNewRoomButton();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new room.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The created <see cref="Room"/>.</returns>
|
||||||
|
protected abstract Room CreateNewRoom();
|
||||||
|
|
||||||
protected abstract RoomSubScreen CreateRoomSubScreen(Room room);
|
protected abstract RoomSubScreen CreateRoomSubScreen(Room room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Triangles.TriangleScale = 1.5f;
|
Triangles.TriangleScale = 1.5f;
|
||||||
|
SpriteText.Font = SpriteText.Font.With(size: 14);
|
||||||
|
|
||||||
Text = "Create room";
|
Text = "Create room";
|
||||||
|
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||||
|
|
||||||
@ -54,19 +52,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
Logger.Log($"Polling adjusted (listing: {multiplayerRoomManager.TimeBetweenListingPolls.Value}, selection: {multiplayerRoomManager.TimeBetweenSelectionPolls.Value})");
|
Logger.Log($"Polling adjusted (listing: {multiplayerRoomManager.TimeBetweenListingPolls.Value}, selection: {multiplayerRoomManager.TimeBetweenSelectionPolls.Value})");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Room CreateNewRoom() =>
|
|
||||||
new Room
|
|
||||||
{
|
|
||||||
Name = { Value = $"{API.LocalUser}'s awesome room" },
|
|
||||||
Category = { Value = RoomCategory.Realtime }
|
|
||||||
};
|
|
||||||
|
|
||||||
protected override string ScreenTitle => "Multiplayer";
|
protected override string ScreenTitle => "Multiplayer";
|
||||||
|
|
||||||
protected override RoomManager CreateRoomManager() => new MultiplayerRoomManager();
|
protected override RoomManager CreateRoomManager() => new MultiplayerRoomManager();
|
||||||
|
|
||||||
protected override LoungeSubScreen CreateLounge() => new MultiplayerLoungeSubScreen();
|
protected override LoungeSubScreen CreateLounge() => new MultiplayerLoungeSubScreen();
|
||||||
|
|
||||||
protected override OsuButton CreateNewMultiplayerGameButton() => new CreateMultiplayerMatchButton();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||||
@ -13,13 +15,24 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
{
|
{
|
||||||
public class MultiplayerLoungeSubScreen : LoungeSubScreen
|
public class MultiplayerLoungeSubScreen : LoungeSubScreen
|
||||||
{
|
{
|
||||||
protected override FilterControl CreateFilterControl() => new MultiplayerFilterControl();
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; }
|
||||||
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new MultiplayerMatchSubScreen(room);
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private MultiplayerClient client { get; set; }
|
private MultiplayerClient client { get; set; }
|
||||||
|
|
||||||
|
protected override FilterControl CreateFilterControl() => new MultiplayerFilterControl();
|
||||||
|
|
||||||
|
protected override OsuButton CreateNewRoomButton() => new CreateMultiplayerMatchButton();
|
||||||
|
|
||||||
|
protected override Room CreateNewRoom() => new Room
|
||||||
|
{
|
||||||
|
Name = { Value = $"{api.LocalUser}'s awesome room" },
|
||||||
|
Category = { Value = RoomCategory.Realtime }
|
||||||
|
};
|
||||||
|
|
||||||
|
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new MultiplayerMatchSubScreen(room);
|
||||||
|
|
||||||
public override void Open(Room room)
|
public override void Open(Room room)
|
||||||
{
|
{
|
||||||
if (!client.IsConnected.Value)
|
if (!client.IsConnected.Value)
|
||||||
|
@ -12,7 +12,6 @@ using osu.Framework.Logging;
|
|||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Input;
|
using osu.Game.Input;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -23,7 +22,6 @@ using osu.Game.Screens.OnlinePlay.Lounge;
|
|||||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||||
using osu.Game.Screens.OnlinePlay.Match;
|
using osu.Game.Screens.OnlinePlay.Match;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay
|
namespace osu.Game.Screens.OnlinePlay
|
||||||
{
|
{
|
||||||
@ -38,7 +36,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
private readonly MultiplayerWaveContainer waves;
|
private readonly MultiplayerWaveContainer waves;
|
||||||
|
|
||||||
private readonly OsuButton createButton;
|
|
||||||
private readonly LoungeSubScreen loungeSubScreen;
|
private readonly LoungeSubScreen loungeSubScreen;
|
||||||
private readonly ScreenStack screenStack;
|
private readonly ScreenStack screenStack;
|
||||||
|
|
||||||
@ -132,18 +129,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
new Header(ScreenTitle, screenStack),
|
new Header(ScreenTitle, screenStack),
|
||||||
createButton = CreateNewMultiplayerGameButton().With(button =>
|
|
||||||
{
|
|
||||||
button.Anchor = Anchor.TopRight;
|
|
||||||
button.Origin = Anchor.TopRight;
|
|
||||||
button.Size = new Vector2(150, Header.HEIGHT - 20);
|
|
||||||
button.Margin = new MarginPadding
|
|
||||||
{
|
|
||||||
Top = 10,
|
|
||||||
Right = 10 + HORIZONTAL_OVERFLOW_PADDING,
|
|
||||||
};
|
|
||||||
button.Action = () => OpenNewRoom();
|
|
||||||
}),
|
|
||||||
RoomManager = CreateRoomManager(),
|
RoomManager = CreateRoomManager(),
|
||||||
ongoingOperationTracker = new OngoingOperationTracker()
|
ongoingOperationTracker = new OngoingOperationTracker()
|
||||||
}
|
}
|
||||||
@ -278,18 +263,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
|
logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates and opens the newly-created room.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="room">An optional template to use when creating the room.</param>
|
|
||||||
public void OpenNewRoom(Room room = null) => loungeSubScreen.Open(room ?? CreateNewRoom());
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new room.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>The created <see cref="Room"/>.</returns>
|
|
||||||
protected abstract Room CreateNewRoom();
|
|
||||||
|
|
||||||
private void screenPushed(IScreen lastScreen, IScreen newScreen)
|
private void screenPushed(IScreen lastScreen, IScreen newScreen)
|
||||||
{
|
{
|
||||||
subScreenChanged(lastScreen, newScreen);
|
subScreenChanged(lastScreen, newScreen);
|
||||||
@ -325,7 +298,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
((IBindable<UserActivity>)Activity).BindTo(newOsuScreen.Activity);
|
((IBindable<UserActivity>)Activity).BindTo(newOsuScreen.Activity);
|
||||||
|
|
||||||
UpdatePollingRate(isIdle.Value);
|
UpdatePollingRate(isIdle.Value);
|
||||||
createButton.FadeTo(newScreen is LoungeSubScreen ? 1 : 0, 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IScreen CurrentSubScreen => screenStack.CurrentScreen;
|
protected IScreen CurrentSubScreen => screenStack.CurrentScreen;
|
||||||
@ -336,8 +308,6 @@ namespace osu.Game.Screens.OnlinePlay
|
|||||||
|
|
||||||
protected abstract LoungeSubScreen CreateLounge();
|
protected abstract LoungeSubScreen CreateLounge();
|
||||||
|
|
||||||
protected abstract OsuButton CreateNewMultiplayerGameButton();
|
|
||||||
|
|
||||||
private class MultiplayerWaveContainer : WaveContainer
|
private class MultiplayerWaveContainer : WaveContainer
|
||||||
{
|
{
|
||||||
protected override bool StartHidden => true;
|
protected override bool StartHidden => true;
|
||||||
|
@ -12,6 +12,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Triangles.TriangleScale = 1.5f;
|
Triangles.TriangleScale = 1.5f;
|
||||||
|
SpriteText.Font = SpriteText.Font.With(size: 14);
|
||||||
|
|
||||||
Text = "Create playlist";
|
Text = "Create playlist";
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Online.Rooms;
|
|
||||||
using osu.Game.Screens.OnlinePlay.Components;
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||||
using osu.Game.Screens.OnlinePlay.Match;
|
using osu.Game.Screens.OnlinePlay.Match;
|
||||||
@ -46,17 +44,10 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
Logger.Log($"Polling adjusted (listing: {playlistsManager.TimeBetweenListingPolls.Value}, selection: {playlistsManager.TimeBetweenSelectionPolls.Value})");
|
Logger.Log($"Polling adjusted (listing: {playlistsManager.TimeBetweenListingPolls.Value}, selection: {playlistsManager.TimeBetweenSelectionPolls.Value})");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Room CreateNewRoom()
|
|
||||||
{
|
|
||||||
return new Room { Name = { Value = $"{API.LocalUser}'s awesome playlist" } };
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override string ScreenTitle => "Playlists";
|
protected override string ScreenTitle => "Playlists";
|
||||||
|
|
||||||
protected override RoomManager CreateRoomManager() => new PlaylistsRoomManager();
|
protected override RoomManager CreateRoomManager() => new PlaylistsRoomManager();
|
||||||
|
|
||||||
protected override LoungeSubScreen CreateLounge() => new PlaylistsLoungeSubScreen();
|
protected override LoungeSubScreen CreateLounge() => new PlaylistsLoungeSubScreen();
|
||||||
|
|
||||||
protected override OsuButton CreateNewMultiplayerGameButton() => new CreatePlaylistsRoomButton();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Screens.OnlinePlay.Lounge;
|
using osu.Game.Screens.OnlinePlay.Lounge;
|
||||||
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
using osu.Game.Screens.OnlinePlay.Lounge.Components;
|
||||||
@ -10,8 +13,18 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
|||||||
{
|
{
|
||||||
public class PlaylistsLoungeSubScreen : LoungeSubScreen
|
public class PlaylistsLoungeSubScreen : LoungeSubScreen
|
||||||
{
|
{
|
||||||
|
[Resolved]
|
||||||
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
protected override FilterControl CreateFilterControl() => new PlaylistsFilterControl();
|
protected override FilterControl CreateFilterControl() => new PlaylistsFilterControl();
|
||||||
|
|
||||||
|
protected override OsuButton CreateNewRoomButton() => new CreatePlaylistsRoomButton();
|
||||||
|
|
||||||
|
protected override Room CreateNewRoom()
|
||||||
|
{
|
||||||
|
return new Room { Name = { Value = $"{api.LocalUser}'s awesome playlist" } };
|
||||||
|
}
|
||||||
|
|
||||||
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new PlaylistsRoomSubScreen(room);
|
protected override RoomSubScreen CreateRoomSubScreen(Room room) => new PlaylistsRoomSubScreen(room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user