small racing game im working on
Diffstat (limited to 'ui/editor/redo.gd')
-rw-r--r--ui/editor/redo.gd13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/editor/redo.gd b/ui/editor/redo.gd
new file mode 100644
index 0000000..46a86e1
--- /dev/null
+++ b/ui/editor/redo.gd
@@ -0,0 +1,13 @@
+extends Button
+
+@onready var hist: UndoRedo = owner.history
+
+func _pressed() -> void:
+ owner.reset_selected()
+ hist.redo()
+
+func _ready() -> void:
+ hist.version_changed.connect(
+ func():
+ disabled = !hist.has_redo()
+ )