mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Allow disabling SkipOverlay through AllowGameplayOverlays.
This commit is contained in:
parent
aa912881b3
commit
7874045b1f
@ -83,6 +83,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private BreakTracker breakTracker;
|
||||
|
||||
private SkipOverlay skipOverlay;
|
||||
|
||||
protected ScoreProcessor ScoreProcessor { get; private set; }
|
||||
|
||||
protected HealthProcessor HealthProcessor { get; private set; }
|
||||
@ -189,6 +191,8 @@ namespace osu.Game.Screens.Play
|
||||
HUDOverlay.ShowHud.Value = false;
|
||||
HUDOverlay.ShowHud.Disabled = true;
|
||||
BreakOverlay.Hide();
|
||||
skipOverlay.Disabled = true;
|
||||
skipOverlay.Hide();
|
||||
}
|
||||
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||
@ -290,7 +294,7 @@ namespace osu.Game.Screens.Play
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre
|
||||
},
|
||||
new SkipOverlay(DrawableRuleset.GameplayStartTime)
|
||||
skipOverlay = new SkipOverlay(DrawableRuleset.GameplayStartTime)
|
||||
{
|
||||
RequestSkip = GameplayClockContainer.Skip
|
||||
},
|
||||
|
@ -39,6 +39,8 @@ namespace osu.Game.Screens.Play
|
||||
[Resolved]
|
||||
private GameplayClock gameplayClock { get; set; }
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
|
||||
|
||||
/// <summary>
|
||||
@ -105,7 +107,8 @@ namespace osu.Game.Screens.Play
|
||||
button.Action = () => RequestSkip?.Invoke();
|
||||
displayTime = gameplayClock.CurrentTime;
|
||||
|
||||
Show();
|
||||
if (!Disabled)
|
||||
Show();
|
||||
}
|
||||
|
||||
protected override void PopIn() => this.FadeIn(fade_time);
|
||||
@ -121,7 +124,7 @@ namespace osu.Game.Screens.Play
|
||||
remainingTimeBox.Width = (float)Interpolation.Lerp(remainingTimeBox.Width, progress, Math.Clamp(Time.Elapsed / 40, 0, 1));
|
||||
|
||||
button.Enabled.Value = progress > 0;
|
||||
State.Value = progress > 0 ? Visibility.Visible : Visibility.Hidden;
|
||||
State.Value = progress > 0 && !Disabled ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user