And bring back old cleanup code, which now seems to work better post-yield-abandonment.

This commit is contained in:
Nolan Darilek 2019-12-29 20:14:11 -06:00
parent 96e7153410
commit 50ea09d7f7
2 changed files with 11 additions and 0 deletions

View File

@ -634,3 +634,9 @@ func _process(delta):
if node.is_inside_tree() and not node.get_focus_owner(): if node.is_inside_tree() and not node.get_focus_owner():
node.get_tree().root.warp_mouse(node.rect_global_position) node.get_tree().root.warp_mouse(node.rect_global_position)
timer = null timer = null
func free():
if timer:
timer.unreference()
timer = null
.free()

View File

@ -86,6 +86,11 @@ func _enter_tree():
connect("swipe_up", self, "swipe_up") connect("swipe_up", self, "swipe_up")
connect("swipe_down", self, "swipe_down") connect("swipe_down", self, "swipe_down")
func _exit_tree():
for accessible in accessibles:
accessible.free()
accessibles = []
func press_and_release(action): func press_and_release(action):
var event = InputEventAction.new() var event = InputEventAction.new()
event.action = action event.action = action