mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 10:02:54 +08:00
Add a skinnable variant of spectator list & hook it up to online data
This commit is contained in:
parent
43fc48a3f3
commit
12b2631e5e
@ -16,6 +16,8 @@ using osu.Game.Online.Chat;
|
||||
using osu.Game.Localisation.HUD;
|
||||
using osu.Game.Localisation.SkinComponents;
|
||||
using osu.Game.Online.Spectator;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
@ -43,8 +45,9 @@ namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
InternalChildren = new[]
|
||||
{
|
||||
Empty().With(t => t.Size = new Vector2(100, 50)),
|
||||
mainFlow = new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
@ -210,4 +213,16 @@ namespace osu.Game.Screens.Play.HUD
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public partial class SkinnableSpectatorList : SpectatorList, ISerialisableDrawable
|
||||
{
|
||||
public bool UsesFixedAnchor { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(SpectatorClient client, Player player)
|
||||
{
|
||||
((IBindableList<SpectatorUser>)Spectators).BindTo(client.WatchingUsers);
|
||||
((IBindable<LocalUserPlayingState>)UserPlayingState).BindTo(player.PlayingState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user