Skip to content

Commit 5bb27ec

Browse files
authored
Input manager fixes (#2078)
* improved typing * Revert "improved typing" This reverts commit dba8ece. * Update input.manager.py to fix event error The latest pyglet update changes Xinput events to use Vec2 so update the Input Manager to match. * Spelling fix
1 parent 32ee44e commit 5bb27ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arcade/experimental/input/manager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,8 @@ def on_button_release(self, controller: Controller, button_name: str):
513513
for action_name in buttons_to_actions:
514514
self.dispatch_action(action_name, ActionState.RELEASED)
515515

516-
def on_stick_motion(self, controller, name, x_value, y_value):
516+
def on_stick_motion(self, controller, name, motion: pyglet.math.Vec2):
517+
x_value, y_value = motion.x, motion.y
517518
if name == "leftx":
518519
self.window.dispatch_event(
519520
"on_stick_motion",
@@ -566,7 +567,7 @@ def on_stick_motion(self, controller, name, x_value, y_value):
566567
self.dispatch_action(action_name, ActionState.RELEASED)
567568

568569
def on_dpad_motion(
569-
self, controller: Controller, left: bool, right: bool, up: bool, down: bool
570+
self, controller: Controller, motion: pyglet.math.Vec2
570571
):
571572
self.active_device = InputDevice.CONTROLLER
572573

0 commit comments

Comments
 (0)