1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:03:21 +08:00

Merge branch 'master' into editor-composer

This commit is contained in:
Dean Herbert 2017-12-04 12:41:40 +09:00 committed by GitHub
commit d75db5046b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

@ -1 +1 @@
Subproject commit cc013fc4063dda0843f38c1c73568a413abcf229
Subproject commit 8c16e6244d8ca884a743a0d5a1f1ee485f18655c

View File

@ -13,6 +13,8 @@ using osu.Framework.Audio;
using osu.Framework.Graphics;
using osu.Game.Rulesets;
using osu.Game.Screens.Menu;
using osu.Framework.Input;
using OpenTK.Input;
namespace osu.Game.Screens
{
@ -73,6 +75,20 @@ namespace osu.Game.Screens
sampleExit = audio.Sample.Get(@"UI/screen-back");
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (args.Repeat || !IsCurrentScreen) return false;
switch (args.Key)
{
case Key.Escape:
Exit();
return true;
}
return base.OnKeyDown(state, args);
}
protected override void OnResuming(Screen last)
{
base.OnResuming(last);