mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 15:52:55 +08:00
Inherit menu items from parent class
This commit is contained in:
parent
f673d16a1f
commit
13c64b59af
@ -340,7 +340,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems
|
public virtual MenuItem[] ContextMenuItems
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
|
|
||||||
public Popover GetPopover() => new PasswordEntryPopover(Room);
|
public Popover GetPopover() => new PasswordEntryPopover(Room);
|
||||||
|
|
||||||
public new MenuItem[] ContextMenuItems
|
public override MenuItem[] ContextMenuItems
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -170,19 +170,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
if (Room.RoomID.HasValue)
|
items.AddRange(base.ContextMenuItems);
|
||||||
{
|
|
||||||
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));
|
|
||||||
})
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)
|
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user