Filter out InputEventMouseButton with device ID of -1, which seems to indicate an origin of touchscreen. Only pass through if explore-by-touch is active.

This commit is contained in:
Nolan Darilek 2019-12-30 08:27:20 -06:00
parent fbbbb1e06e
commit 5b2c16f342

View File

@ -158,7 +158,9 @@ func _input(event):
return
if not explore_by_touch and OS.get_ticks_msec() - touch_start_time >= explore_by_touch_interval:
explore_by_touch = true
TTS.speak("Explore")
if event is InputEventMouseButton:
if event.device == -1 and not explore_by_touch:
get_tree().set_input_as_handled()
func _process(delta):
if touch_stop_time and OS.get_ticks_msec() - touch_stop_time >= tap_execute_interval and tap_count != 0: