Allow disabling SkipOverlay through AllowGameplayOverlays.

This commit is contained in:
Lucas A
2020-05-12 21:12:48 +02:00
parent aa912881b3
commit 7874045b1f
2 changed files with 10 additions and 3 deletions

View File

@ -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)