mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Implement joystick keybindings
This commit is contained in:
Submodule osu-framework updated: 85b3494117...3388ae24ba
@ -223,6 +223,26 @@ namespace osu.Game.Overlays.KeyBinding
|
|||||||
return true;
|
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()
|
private void finalise()
|
||||||
{
|
{
|
||||||
if (bindTarget != null)
|
if (bindTarget != null)
|
||||||
|
Reference in New Issue
Block a user