update docs
Python CI / test (3.12) (push) Successful in 8m40s
Python CI / test (3.13) (push) Successful in 22m41s

This commit is contained in:
2025-11-09 22:06:06 +01:00
parent 0f9e38eb7c
commit 8f6205dcfe
6 changed files with 1606 additions and 1503 deletions
+6 -1
View File
@@ -200,6 +200,8 @@ class PygameDisplayHAL(EventLoopHAL):
# Detect gesture type
gesture = None
# For swipe gestures, use the starting position (mouse_down_pos)
# For tap/long-press, use the ending position (mouse_up_pos)
x, y = mouse_up_pos
if distance < self.drag_threshold:
@@ -211,7 +213,8 @@ class PygameDisplayHAL(EventLoopHAL):
gesture = GestureType.TAP
logger.info(f"[GESTURE] ✓ Detected: TAP")
else:
# Swipe
# Swipe - use starting position for location-based checks
x, y = self.mouse_down_pos
if abs(dx) > abs(dy):
# Horizontal swipe
if dx > 0:
@@ -233,6 +236,8 @@ class PygameDisplayHAL(EventLoopHAL):
self.mouse_down_pos = None
if gesture:
# For swipe gestures, (x,y) is the start position
# For tap/long-press, (x,y) is the tap position
logger.info(f"[EVENT] Returning TouchEvent: {gesture.value} at ({x}, {y})")
return TouchEvent(gesture, x, y)
else: