mirror of
https://github.com/ppy/osu.git
synced 2025-01-31 14:25:10 +08:00
Adjust layout and code quality slightly
This commit is contained in:
parent
d326f23576
commit
05b1002e9d
@ -349,23 +349,17 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
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));
|
||||
})
|
||||
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)))
|
||||
]);
|
||||
}
|
||||
|
||||
return items.ToArray();
|
||||
|
||||
string formatRoomUrl(long id) => $@"{api.WebsiteRootUrl}/multiplayer/rooms/{id}";
|
||||
}
|
||||
}
|
||||
|
||||
private string formatRoomUrl(long id) => $@"{api.WebsiteRootUrl}/multiplayer/rooms/{id}";
|
||||
|
||||
protected virtual UpdateableBeatmapBackgroundSprite CreateBackground() => new UpdateableBeatmapBackgroundSprite();
|
||||
|
||||
protected virtual IEnumerable<Drawable> CreateBottomDetails()
|
||||
|
@ -159,16 +159,13 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
{
|
||||
get
|
||||
{
|
||||
var items = new List<MenuItem>
|
||||
{
|
||||
new OsuMenuItem("Create copy", MenuItemType.Standard, () =>
|
||||
{
|
||||
lounge?.OpenCopy(Room);
|
||||
})
|
||||
};
|
||||
var items = new List<MenuItem>();
|
||||
|
||||
items.AddRange(base.ContextMenuItems);
|
||||
|
||||
items.Add(new OsuMenuItemSpacer());
|
||||
items.Add(new OsuMenuItem("Create copy", MenuItemType.Standard, () => lounge?.OpenCopy(Room)));
|
||||
|
||||
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)
|
||||
{
|
||||
items.Add(new OsuMenuItem("Close playlist", MenuItemType.Destructive, () =>
|
||||
|
Loading…
Reference in New Issue
Block a user