fix gamepad input firing early
This commit is contained in:
@@ -11,6 +11,7 @@ import flixel.input.actions.FlxAction;
|
||||
import flixel.input.actions.FlxActionInput;
|
||||
import flixel.input.FlxInput;
|
||||
import flixel.input.gamepad.FlxGamepadInputID;
|
||||
import flixel.input.gamepad.FlxGamepad;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class FlxKeyShortcutHandler<T> extends KeyShortcutHandler<T> {}
|
||||
|
@@ -42,7 +42,11 @@
|
||||
gamepadId)]
|
||||
// capture the fake JUST_PRESSED event harmlessly
|
||||
(action.update)
|
||||
(set action.callback ->:Void _ (handleKey keyString))
|
||||
(set action.callback ->:Void _ {
|
||||
(when (FlxG.gamepads.anyJustPressed buttonId)
|
||||
(print "$buttonId")
|
||||
(handleKey keyString))
|
||||
})
|
||||
action))))
|
||||
|
||||
(method :Void update []
|
||||
|
Reference in New Issue
Block a user