From 1851e973466a3807927227c7992b6e049cc1340f Mon Sep 17 00:00:00 2001 From: johni0702 Date: Sat, 22 Oct 2016 22:24:01 +0200 Subject: [PATCH] Allow deletion of selected keyframes by pressing the DELETE key (fixes #19) --- .../java/com/replaymod/simplepathing/gui/GuiPathing.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/replaymod/simplepathing/gui/GuiPathing.java b/src/main/java/com/replaymod/simplepathing/gui/GuiPathing.java index fbe43ac6..ab8aae28 100644 --- a/src/main/java/com/replaymod/simplepathing/gui/GuiPathing.java +++ b/src/main/java/com/replaymod/simplepathing/gui/GuiPathing.java @@ -403,6 +403,15 @@ public class GuiPathing { }); }); + core.getKeyBindingRegistry().registerRaw(Keyboard.KEY_DELETE, () -> { + if (!overlay.isVisible()) { + return; + } + if (mod.getSelectedKeyframe() != null) { + updateKeyframe(mod.getSelectedKeyframe().getValue(TimestampProperty.PROPERTY).isPresent()); + } + }); + // Start loading entity tracker entityTrackerFuture = SettableFuture.create(); new Thread(() -> {