1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00
osu-lazer/osu.Game/Screens/Play/QuickExit.cs

29 lines
759 B
C#
Raw Normal View History

2018-07-11 03:57:09 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2018-07-11 04:16:08 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-07-11 03:57:09 +08:00
using osu.Framework.Input.Bindings;
using osu.Game.Input.Bindings;
using osu.Game.Overlays;
namespace osu.Game.Screens.Play
{
public class QuickExit : HoldToConfirmOverlay, IKeyBindingHandler<GlobalAction>
{
public bool OnPressed(GlobalAction action)
{
if (action != GlobalAction.QuickExit) return false;
BeginConfirm();
return true;
}
public bool OnReleased(GlobalAction action)
{
if (action != GlobalAction.QuickExit) return false;
AbortConfirm();
return true;
}
}
}