mirror of
https://github.com/osukey/osukey.git
synced 2025-05-23 14:37:39 +09:00
Refactor content redirection logic to be easier to parse
This commit is contained in:
parent
78ea2d50bb
commit
fc37d8b7df
@ -45,18 +45,21 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
[Cached]
|
[Cached]
|
||||||
protected OnlinePlayBeatmapAvailablilityTracker BeatmapAvailablilityTracker { get; }
|
protected OnlinePlayBeatmapAvailablilityTracker BeatmapAvailablilityTracker { get; }
|
||||||
|
|
||||||
private readonly Container content = new Container { RelativeSizeAxes = Axes.Both };
|
private readonly Container content;
|
||||||
|
|
||||||
protected RoomSubScreen()
|
protected RoomSubScreen()
|
||||||
{
|
{
|
||||||
BeatmapAvailablilityTracker = new OnlinePlayBeatmapAvailablilityTracker
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
SelectedItem = { BindTarget = SelectedItem }
|
BeatmapAvailablilityTracker = new OnlinePlayBeatmapAvailablilityTracker
|
||||||
|
{
|
||||||
|
SelectedItem = { BindTarget = SelectedItem }
|
||||||
|
},
|
||||||
|
content = new Container { RelativeSizeAxes = Axes.Both },
|
||||||
};
|
};
|
||||||
|
|
||||||
base.AddInternal(content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Forward all internal management to content to ensure locally added components are not removed unintentionally.
|
||||||
// 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)
|
// 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 void AddInternal(Drawable drawable) => content.Add(drawable);
|
||||||
protected override bool RemoveInternal(Drawable drawable) => content.Remove(drawable);
|
protected override bool RemoveInternal(Drawable drawable) => content.Remove(drawable);
|
||||||
@ -65,8 +68,6 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
base.AddInternal(BeatmapAvailablilityTracker);
|
|
||||||
|
|
||||||
sampleStart = audio.Samples.Get(@"SongSelect/confirm-selection");
|
sampleStart = audio.Samples.Get(@"SongSelect/confirm-selection");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user