mirror of https://github.com/ppy/osu
Expose `LocalUserPlaying` from `Player`
This commit is contained in:
parent
e3b29df299
commit
0d283aa6a3
|
@ -3,7 +3,6 @@
|
|||
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
|
@ -66,7 +65,6 @@ public void TestGameplayOverlayActivationBreaks()
|
|||
protected class OverlayTestPlayer : TestPlayer
|
||||
{
|
||||
public new OverlayActivation OverlayActivationMode => base.OverlayActivationMode.Value;
|
||||
public new Bindable<bool> LocalUserPlaying => base.LocalUserPlaying;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,9 @@ public abstract class Player : ScreenWithBeatmapBackground, ISamplePlaybackDisab
|
|||
|
||||
private readonly Bindable<bool> storyboardReplacesBackground = new Bindable<bool>();
|
||||
|
||||
protected readonly Bindable<bool> LocalUserPlaying = new Bindable<bool>();
|
||||
public IBindable<bool> LocalUserPlaying => localUserPlaying;
|
||||
|
||||
private readonly Bindable<bool> localUserPlaying = new Bindable<bool>();
|
||||
|
||||
public int RestartCount;
|
||||
|
||||
|
@ -442,7 +444,7 @@ private void updateGameplayState()
|
|||
{
|
||||
bool inGameplay = !DrawableRuleset.HasReplayLoaded.Value && !DrawableRuleset.IsPaused.Value && !breakTracker.IsBreakTime.Value;
|
||||
OverlayActivationMode.Value = inGameplay ? OverlayActivation.Disabled : OverlayActivation.UserTriggered;
|
||||
LocalUserPlaying.Value = inGameplay;
|
||||
localUserPlaying.Value = inGameplay;
|
||||
}
|
||||
|
||||
private void updateSampleDisabledState()
|
||||
|
|
Loading…
Reference in New Issue