mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 01:17:35 +09:00
Cache selected item bindable from RoomSubScreen
This commit is contained in:
parent
f25b5147ef
commit
855d24dce7
@ -21,6 +21,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
[Cached(typeof(IPreviewTrackOwner))]
|
||||
public abstract class RoomSubScreen : OnlinePlaySubScreen, IPreviewTrackOwner
|
||||
{
|
||||
[Cached(typeof(IBindable<PlaylistItem>))]
|
||||
protected readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
|
||||
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
@ -2,10 +2,12 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Screens.OnlinePlay
|
||||
@ -50,5 +52,13 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
[Resolved(typeof(Room))]
|
||||
protected Bindable<TimeSpan?> Duration { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The currently selected item in the <see cref="RoomSubScreen"/>.
|
||||
/// May be null if this <see cref="OnlinePlayComposite"/> is not inside a <see cref="RoomSubScreen"/>.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
[Resolved(typeof(Room), CanBeNull = true)]
|
||||
protected IBindable<PlaylistItem> SelectedItem { get; private set; }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user