mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Better pause logic
This commit is contained in:
@ -89,6 +89,14 @@ namespace osu.Game.Rulesets.UI
|
||||
Ruleset = ruleset;
|
||||
playfield = new Lazy<Playfield>(CreatePlayfield);
|
||||
|
||||
IsPaused.ValueChanged += paused =>
|
||||
{
|
||||
if (HasReplayLoaded)
|
||||
return;
|
||||
|
||||
KeyBindingInputManager.UseParentInput = !paused;
|
||||
};
|
||||
|
||||
Cursor = CreateCursor();
|
||||
}
|
||||
|
||||
@ -120,6 +128,11 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
public Replay Replay { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the game is paused. Used to block user input.
|
||||
/// </summary>
|
||||
public readonly BindableBool IsPaused = new BindableBool();
|
||||
|
||||
/// <summary>
|
||||
/// Sets a replay to be used, overriding local input.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user