final changes for better touch function
This commit is contained in:
2
main.py
2
main.py
@@ -76,7 +76,7 @@ case_images = {}
|
||||
def touch(event):
|
||||
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_time = time.time()
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user