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:
commit
d75db5046b
@ -1 +1 @@
|
||||
Subproject commit cc013fc4063dda0843f38c1c73568a413abcf229
|
||||
Subproject commit 8c16e6244d8ca884a743a0d5a1f1ee485f18655c
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user