mirror of
https://github.com/ppy/osu
synced 2024-12-12 18:07:52 +00:00
25 lines
697 B
C#
25 lines
697 B
C#
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Framework.Input;
|
|
using OpenTK.Input;
|
|
|
|
namespace osu.Game.Screens.Play
|
|
{
|
|
public class FailOverlay : InGameOverlay
|
|
{
|
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
|
{
|
|
if (args.Key == Key.Escape)
|
|
{
|
|
if (State == Visibility.Hidden) return false;
|
|
OnQuit();
|
|
return true;
|
|
}
|
|
|
|
return base.OnKeyDown(state, args);
|
|
}
|
|
}
|
|
}
|