fix redo
This commit is contained in:
parent
498554be29
commit
4310cd14f1
1 changed files with 4 additions and 2 deletions
6
main.gd
6
main.gd
|
|
@ -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()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue