Handle OnMouseDown in PauseOverlay such that players can not click circles through the overlay while paused.

This commit is contained in:
Thomas Müller 2017-02-05 20:17:29 +01:00
parent 0f72ef7dc2
commit 91f0951255

View File

@ -69,6 +69,9 @@ namespace osu.Game.Overlays.Pause
protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In); protected override void PopIn() => FadeIn(transition_duration, EasingTypes.In);
protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In); protected override void PopOut() => FadeOut(transition_duration, EasingTypes.In);
// Don't let mouse down events through the overlay or people can click circles while paused.
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true;
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{ {
if (args.Key == Key.Escape) if (args.Key == Key.Escape)