mirror of
https://github.com/ppy/osu
synced 2025-02-01 10:51:53 +00:00
Merge pull request #2346 from smoogipoo/joystick
Implement joystick input
This commit is contained in:
commit
9515eb4281
@ -1 +1 @@
|
||||
Subproject commit f8079973011b54e84e5c0e677fe2b56e55947666
|
||||
Subproject commit fac688633b8fcf34ae5d0514c26b03e217161eb4
|
@ -223,6 +223,26 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickPress(InputState state, Framework.Input.JoystickEventArgs args)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickRelease(InputState state, Framework.Input.JoystickEventArgs args)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return base.OnJoystickRelease(state, args);
|
||||
|
||||
finalise();
|
||||
return true;
|
||||
}
|
||||
|
||||
private void finalise()
|
||||
{
|
||||
if (bindTarget != null)
|
||||
|
Loading…
Reference in New Issue
Block a user