From 3c4c1e49e7fd7415c84156c34cb8ba7aa133dd49 Mon Sep 17 00:00:00 2001 From: DragonMoffon Date: Sat, 16 Nov 2024 11:42:35 +1300 Subject: [PATCH 1/2] remove trailing whitespace --- arcade/camera/camera_2d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arcade/camera/camera_2d.py b/arcade/camera/camera_2d.py index 549009b3f..79b6bf235 100644 --- a/arcade/camera/camera_2d.py +++ b/arcade/camera/camera_2d.py @@ -484,8 +484,8 @@ def point_in_view(self, point: Point2) -> bool: """ # This is unwrapped from standard Vec2 operations, # The construction and garbage collection of the vectors would - # increase this method's cost by ~4x - + # increase this method's cost by ~4x + pos = self.position diff = point[0] - pos[0], point[1] - pos[1] From 0fa8d3f2c1ee2e26fad55a6a225440bad0817a6d Mon Sep 17 00:00:00 2001 From: DragonMoffon Date: Wed, 20 Nov 2024 16:42:48 +1300 Subject: [PATCH 2/2] Add triggers to controller buttons because old controllers don't use them as axis --- arcade/future/input/inputs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arcade/future/input/inputs.py b/arcade/future/input/inputs.py index 59bc6848b..05eaa50cb 100644 --- a/arcade/future/input/inputs.py +++ b/arcade/future/input/inputs.py @@ -65,6 +65,8 @@ class ControllerButtons(StrEnum): BOTTOM_FACE = "a" LEFT_SHOULDER = "leftshoulder" RIGHT_SHOULDER = "rightshoulder" + LEFT_TRIGGER = "lefttrigger" + RIGHT_TRIGGER = "righttrigger" START = "start" BACK = "back" GUIDE = "guide" @@ -101,11 +103,13 @@ class PSControllerButtons(StrEnum): CROSS = ControllerButtons.BOTTOM_FACE L1 = ControllerButtons.LEFT_SHOULDER R1 = ControllerButtons.RIGHT_SHOULDER + L2 = ControllerButtons.LEFT_TRIGGER + R2 = ControllerButtons.RIGHT_TRIGGER + L3 = ControllerButtons.LEFT_STICK + R3 = ControllerButtons.RIGHT_STICK START = ControllerButtons.START SELECT = ControllerButtons.BACK GUIDE = ControllerButtons.GUIDE - LEFT_STICK = ControllerButtons.LEFT_STICK - RIGHT_STICK = ControllerButtons.RIGHT_STICK DPAD_LEFT = ControllerButtons.DPAD_LEFT DPAD_RIGHT = ControllerButtons.DPAD_RIGHT DPAD_UP = ControllerButtons.DPAD_UP