Allow playfield to specify whether it has a cursor or not.

This commit is contained in:
Dean Herbert
2017-04-05 17:38:13 +09:00
parent 4b1588a21d
commit 4aafc172ca
5 changed files with 22 additions and 5 deletions

View File

@ -42,6 +42,16 @@ namespace osu.Game.Modes.UI
/// </summary>
protected readonly KeyConversionInputManager KeyConversionInputManager;
/// <summary>
/// Whether we are currently providing the local user a gameplay cursor.
/// </summary>
public virtual bool ProvidingUserCursor => false;
/// <summary>
/// Whether we have a replay loaded currently.
/// </summary>
public bool HasReplayLoaded => InputManager.ReplayInputHandler != null;
/// <summary>
/// Whether all the HitObjects have been judged.
/// </summary>
@ -157,6 +167,8 @@ namespace osu.Game.Modes.UI
{
public event Action<TJudgement> OnJudgement;
public sealed override bool ProvidingUserCursor => !HasReplayLoaded && Playfield.ProvidingUserCursor;
protected override Container<Drawable> Content => content;
protected override bool AllObjectsJudged => Playfield.HitObjects.Children.All(h => h.Judgement.Result != HitResult.None);