1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-07 19:02:58 +08:00

Inherit menu items from parent class

This commit is contained in:
Layendan 2025-01-23 15:36:20 -07:00
parent f673d16a1f
commit 13c64b59af
2 changed files with 3 additions and 15 deletions

View File

@ -340,7 +340,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
}
}
public MenuItem[] ContextMenuItems
public virtual MenuItem[] ContextMenuItems
{
get
{

View File

@ -158,7 +158,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
public Popover GetPopover() => new PasswordEntryPopover(Room);
public new MenuItem[] ContextMenuItems
public override MenuItem[] ContextMenuItems
{
get
{
@ -170,19 +170,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
})
};
if (Room.RoomID.HasValue)
{
items.AddRange([
new OsuMenuItem("View in browser", MenuItemType.Standard, () =>
{
game?.OpenUrlExternally(formatRoomUrl(Room.RoomID.Value));
}),
new OsuMenuItem("Copy link", MenuItemType.Standard, () =>
{
game?.CopyUrlToClipboard(formatRoomUrl(Room.RoomID.Value));
})
]);
}
items.AddRange(base.ContextMenuItems);
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)
{