This commit is contained in:
mehbark 2025-05-01 16:19:21 -04:00
parent 498554be29
commit 4310cd14f1

View file

@ -31,10 +31,12 @@ func _input(event: InputEvent) -> void:
step(Vector2i.LEFT) step(Vector2i.LEFT)
elif event.is_action_pressed("r"): elif event.is_action_pressed("r"):
step(Vector2i.RIGHT) step(Vector2i.RIGHT)
elif event.is_action_pressed("undo"): # because most redo keybinds are a superset of undo, we check them first
hist.undo() # e.g. if C-Z, then C-z is pressed
elif event.is_action_pressed("redo"): elif event.is_action_pressed("redo"):
hist.redo() hist.redo()
elif event.is_action_pressed("undo"):
hist.undo()
elif event.is_action_pressed("restart"): elif event.is_action_pressed("restart"):
restart() restart()