mirror of
https://github.com/ppy/osu.git
synced 2025-01-16 00:13:12 +08:00
Implement joystick keybindings
This commit is contained in:
parent
25524bf24f
commit
e9ec544bf6
@ -1 +1 @@
|
||||
Subproject commit 85b3494117ccef1b396b70957e1cffaba06e2b54
|
||||
Subproject commit 3388ae24ba5cc75fc966ab1531f44701e74588a9
|
@ -223,6 +223,26 @@ namespace osu.Game.Overlays.KeyBinding
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickPress(InputState state, JoystickPressEventArgs args)
|
||||
{
|
||||
if (!HasFocus)
|
||||
return false;
|
||||
|
||||
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
|
||||
finalise();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnJoystickRelease(InputState state, JoystickReleaseEventArgs 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