mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Revert to previous exposure of RoomSubScreen.BeatmapAvailability
This commit is contained in:
parent
b252b176d4
commit
414d920ca2
@ -65,7 +65,9 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
protected OnlinePlayBeatmapAvailabilityTracker BeatmapAvailabilityTracker { get; private set; }
|
private OnlinePlayBeatmapAvailabilityTracker beatmapAvailabilityTracker { get; set; }
|
||||||
|
|
||||||
|
protected IBindable<BeatmapAvailability> BeatmapAvailability => beatmapAvailabilityTracker.Availability;
|
||||||
|
|
||||||
public readonly Room Room;
|
public readonly Room Room;
|
||||||
private readonly bool allowEdit;
|
private readonly bool allowEdit;
|
||||||
@ -86,7 +88,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
|
|
||||||
Padding = new MarginPadding { Top = Header.HEIGHT };
|
Padding = new MarginPadding { Top = Header.HEIGHT };
|
||||||
|
|
||||||
BeatmapAvailabilityTracker = new OnlinePlayBeatmapAvailabilityTracker
|
beatmapAvailabilityTracker = new OnlinePlayBeatmapAvailabilityTracker
|
||||||
{
|
{
|
||||||
SelectedItem = { BindTarget = SelectedItem }
|
SelectedItem = { BindTarget = SelectedItem }
|
||||||
};
|
};
|
||||||
@ -101,7 +103,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
BeatmapAvailabilityTracker,
|
beatmapAvailabilityTracker,
|
||||||
new GridContainer
|
new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
SelectedItem.BindTo(client.CurrentMatchPlayingItem);
|
SelectedItem.BindTo(client.CurrentMatchPlayingItem);
|
||||||
|
|
||||||
BeatmapAvailabilityTracker.Availability.BindValueChanged(updateBeatmapAvailability, true);
|
BeatmapAvailability.BindValueChanged(updateBeatmapAvailability, true);
|
||||||
UserMods.BindValueChanged(onUserModsChanged);
|
UserMods.BindValueChanged(onUserModsChanged);
|
||||||
|
|
||||||
client.LoadRequested += onLoadRequested;
|
client.LoadRequested += onLoadRequested;
|
||||||
@ -362,7 +362,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
private void onLoadRequested()
|
private void onLoadRequested()
|
||||||
{
|
{
|
||||||
if (BeatmapAvailabilityTracker.Availability.Value.State != DownloadState.LocallyAvailable)
|
if (BeatmapAvailability.Value.State != DownloadState.LocallyAvailable)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// In the case of spectating, IMultiplayerClient.LoadRequested can be fired while the game is still spectating a previous session.
|
// In the case of spectating, IMultiplayerClient.LoadRequested can be fired while the game is still spectating a previous session.
|
||||||
|
Loading…
Reference in New Issue
Block a user