Space to skip.

This commit is contained in:
Dean Herbert 2017-02-22 21:28:40 +09:00
parent 735961977b
commit 7cda82d016
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49
1 changed files with 16 additions and 0 deletions

View File

@ -4,8 +4,10 @@
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK.Input;
namespace osu.Game.Screens.Play
{
@ -28,5 +30,19 @@ private void load(AudioManager audio, OsuColour colours)
Colour = colours.Yellow;
HoverColour = colours.YellowDark;
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (args.Repeat) return false;
switch (args.Key)
{
case Key.Space:
TriggerClick();
return true;
}
return base.OnKeyDown(state, args);
}
}
}