mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add the ability to exit the game using escape.
This commit is contained in:
@ -125,6 +125,15 @@ namespace osu.Game.GameModes.Menu
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
if (args.Key == Key.Escape)
|
||||
{
|
||||
if (State == MenuState.Initial)
|
||||
return false;
|
||||
|
||||
State = MenuState.Initial;
|
||||
return true;
|
||||
}
|
||||
|
||||
osuLogo.TriggerClick(state);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user