final changes for better touch function

This commit is contained in:
2025-05-03 00:28:58 +02:00
parent bc9670def7
commit 9f1b8ec43f

View File

@@ -76,7 +76,7 @@ case_images = {}
def touch(event): def touch(event):
global touch_start, touch_start_time global touch_start, touch_start_time
if event.type == pygame.FINGERDOWN: if event.type == pygame.FINGERDOWN and not touch_start:
touch_start = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT) touch_start = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT)
touch_start_time = time.time() touch_start_time = time.time()
return None return None