final changes for better touch function
This commit is contained in:
6
main.py
6
main.py
@@ -93,11 +93,11 @@ async def touch(event):
|
||||
touch_start = None
|
||||
touch_start_time = None
|
||||
|
||||
if abs(dx) < 30 and abs(dy) < 30 and duration < 0.3:
|
||||
if abs(dx) < 30 and abs(dy) < 30 and duration < 0.1:
|
||||
return "snap"
|
||||
elif dx < -50 and abs(dy) < 80 and duration > 0.3:
|
||||
elif dx < -50 and abs(dy) < 80 and duration > 0.08:
|
||||
return "tilt"
|
||||
elif dy < -50 and abs(dx) < 80 and duration > 0.3:
|
||||
elif dy < -50 and abs(dx) < 80 and duration > 0.08:
|
||||
return "ontop"
|
||||
else:
|
||||
print("touch problem")
|
||||
|
||||
Reference in New Issue
Block a user