Add to inspector also

This commit is contained in:
smoogipoo 2020-12-03 17:59:39 +09:00
parent 3550e5b30f
commit 3e62da119e
3 changed files with 24 additions and 5 deletions

View File

@ -0,0 +1,22 @@
// 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.
using osu.Game.Online.Multiplayer;
namespace osu.Game.Screens.Multi.Components
{
public class OverlinedPlaylistHeader : OverlinedHeader
{
public OverlinedPlaylistHeader()
: base("Playlist")
{
}
protected override void LoadComplete()
{
base.LoadComplete();
Playlist.BindCollectionChanged((_, __) => Details.Value = Playlist.GetTotalDuration());
}
}
}

View File

@ -67,7 +67,7 @@ private void load(OsuColour colours)
}
}
},
new Drawable[] { new OverlinedHeader("Playlist"), },
new Drawable[] { new OverlinedPlaylistHeader(), },
new Drawable[]
{
new DrawableRoomPlaylist(false, false)

View File

@ -57,7 +57,6 @@ public class MatchSubScreen : MultiplayerSubScreen, IPreviewTrackOwner
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
private OverlinedHeader participantsHeader;
private OverlinedHeader playlistHeader;
public MatchSubScreen(Room room)
{
@ -136,7 +135,7 @@ private void load()
RelativeSizeAxes = Axes.Both,
Content = new[]
{
new Drawable[] { playlistHeader = new OverlinedHeader("Playlist"), },
new Drawable[] { new OverlinedPlaylistHeader(), },
new Drawable[]
{
new DrawableRoomPlaylistWithResults
@ -244,8 +243,6 @@ protected override void LoadComplete()
managerUpdated = beatmapManager.ItemUpdated.GetBoundCopy();
managerUpdated.BindValueChanged(beatmapUpdated);
playlist.BindCollectionChanged((_, __) => playlistHeader.Details.Value = playlist.GetTotalDuration(), true);
}
public override bool OnExiting(IScreen next)