mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix ReplayLoader not being treated as having a replay loaded
Player checks for HasReplayLoaded in Player.load(), but the replay is attached in ReplayPlayer.LoadComplete(), which is too late.
This commit is contained in:
@ -13,6 +13,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Rulesets.Replays;
|
||||
@ -45,9 +46,9 @@ namespace osu.Game.Rulesets.UI
|
||||
public PassThroughInputManager KeyBindingInputManager;
|
||||
|
||||
/// <summary>
|
||||
/// Whether we have a replay loaded currently.
|
||||
/// Whether a replay is currently loaded.
|
||||
/// </summary>
|
||||
public bool HasReplayLoaded => ReplayInputManager?.ReplayInputHandler != null;
|
||||
public readonly BindableBool HasReplayLoaded = new BindableBool();
|
||||
|
||||
public abstract IEnumerable<HitObject> Objects { get; }
|
||||
|
||||
@ -99,6 +100,8 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
Replay = replay;
|
||||
ReplayInputManager.ReplayInputHandler = replay != null ? CreateReplayInputHandler(replay) : null;
|
||||
|
||||
HasReplayLoaded.Value = ReplayInputManager.ReplayInputHandler != null;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user