final changes for better touch function

This commit is contained in:
2025-05-03 00:49:48 +02:00
parent 4ea04b1ade
commit 8bda83838c

View File

@@ -708,10 +708,10 @@ async def main():
running = False
elif event.type == pygame.KEYDOWN or event.type == pygame.JOYBUTTONDOWN or event.type == pygame.JOYHATMOTION or event.type == pygame.FINGERDOWN or touch_start or (event.type == pygame.MOUSEBUTTONDOWN and event.button == 1):
if state == 1: # PLAYING
result = None
if pygame.FINGERUP and touch_start:
result = touch(event)
else:
result = None
if is_LEFT_event(event) or result == "ontop":
can_tip = current_case.length_units * UNIT_HEIGHT <= TRAILER_HEIGHT
if current_case and current_case.allow_snap and can_use_tilt and can_tip: