1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 08:30:00 +08:00

Add "Select" action

Allows progressing forwards in the interface
This commit is contained in:
Dean Herbert
2018-07-03 18:34:42 +09:00
Unverified
parent 87ac756fa1
commit 8567f80de4
6 changed files with 40 additions and 30 deletions
+3 -15
View File
@@ -10,7 +10,6 @@ using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
using osu.Framework.Logging;
using osu.Framework.Threading;
@@ -113,26 +112,15 @@ namespace osu.Game.Screens.Menu
sampleBack = audio.Sample.Get(@"Menu/button-back-select");
}
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
{
if (args.Repeat) return false;
switch (args.Key)
{
case Key.Space:
logo?.TriggerOnClick(state);
return true;
}
return false;
}
public bool OnPressed(GlobalAction action)
{
switch (action)
{
case GlobalAction.Back:
return goBack();
case GlobalAction.Select:
logo?.TriggerOnClick();
return true;
default:
return false;
}