Repair zooming! _unhandled_input is magic!

This commit is contained in:
Sebastian Morr 2020-10-15 16:49:28 +02:00
parent a7495ce054
commit 8df293b4f5

View file

@ -40,12 +40,11 @@ func _process(_delta):
if path:
apply_forces()
#func _input(event):
# if mouse_inside:
# if event.is_action_pressed("zoom_out") and nodes.rect_scale.x > 0.3:
# nodes.rect_scale -= Vector2(0.05, 0.05)
# if event.is_action_pressed("zoom_in") and nodes.rect_scale.x < 2:
# nodes.rect_scale += Vector2(0.05, 0.05)
func _unhandled_input(event):
if event.is_action_pressed("zoom_out") and nodes.rect_scale.x > 0.3:
nodes.rect_scale -= Vector2(0.05, 0.05)
if event.is_action_pressed("zoom_in") and nodes.rect_scale.x < 2:
nodes.rect_scale += Vector2(0.05, 0.05)
func there_is_a_git():
return shell.run("test -d .git && echo yes || echo no") == "yes\n"