mirror of
https://github.com/ppy/osu
synced 2025-01-25 07:13:22 +00:00
Forward internal management to a container alongside tracker
This commit is contained in:
parent
4a1acdece2
commit
34612ae233
@ -7,6 +7,8 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -43,14 +45,23 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
[Cached]
|
||||
protected readonly MultiplayerBeatmapTracker BeatmapTracker;
|
||||
|
||||
private readonly Container content = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
protected RoomSubScreen()
|
||||
{
|
||||
InternalChild = BeatmapTracker = new MultiplayerBeatmapTracker
|
||||
base.AddInternal(BeatmapTracker = new MultiplayerBeatmapTracker
|
||||
{
|
||||
SelectedItem = { BindTarget = SelectedItem },
|
||||
};
|
||||
SelectedItem = { BindTarget = SelectedItem }
|
||||
});
|
||||
|
||||
base.AddInternal(content);
|
||||
}
|
||||
|
||||
// This is a bit ugly but we don't have the concept of InternalContent so it'll have to do for now. (https://github.com/ppy/osu-framework/issues/1690)
|
||||
protected override void AddInternal(Drawable drawable) => content.Add(drawable);
|
||||
protected override bool RemoveInternal(Drawable drawable) => content.Remove(drawable);
|
||||
protected override void ClearInternal(bool disposeChildren = true) => content.Clear(disposeChildren);
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
AddRangeInternal(new Drawable[]
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new GridContainer
|
||||
{
|
||||
@ -176,7 +176,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
State = { Value = client.Room == null ? Visibility.Visible : Visibility.Hidden }
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
AddRangeInternal(new Drawable[]
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new GridContainer
|
||||
{
|
||||
@ -188,7 +188,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
EditPlaylist = () => this.Push(new MatchSongSelect()),
|
||||
State = { Value = roomId.Value == null ? Visibility.Visible : Visibility.Hidden }
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
|
Loading…
Reference in New Issue
Block a user