update docs
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user