mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Context menu for duplicating multi rooms
This commit is contained in:
@ -16,6 +16,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Online.Multiplayer;
|
||||
using osuTK;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
|
||||
namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
{
|
||||
@ -37,17 +38,24 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
[Resolved]
|
||||
private IRoomManager roomManager { get; set; }
|
||||
|
||||
public Action<Room> DuplicateRoom;
|
||||
|
||||
public RoomsContainer()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
InternalChild = roomFlow = new FillFlowContainer<DrawableRoom>
|
||||
InternalChild = new OsuContextMenuContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(2),
|
||||
Child = roomFlow = new FillFlowContainer<DrawableRoom>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(2),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -88,6 +96,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
|
||||
{
|
||||
roomFlow.Add(new DrawableRoom(room)
|
||||
{
|
||||
DuplicateRoom = DuplicateRoom,
|
||||
Action = () =>
|
||||
{
|
||||
if (room == selectedRoom.Value)
|
||||
|
Reference in New Issue
Block a user