diff --git a/racevisionGame/src/main/java/visualiser/Controllers/KeyBindingsController.java b/racevisionGame/src/main/java/visualiser/Controllers/KeyBindingsController.java index aa8cf66f..5822179c 100644 --- a/racevisionGame/src/main/java/visualiser/Controllers/KeyBindingsController.java +++ b/racevisionGame/src/main/java/visualiser/Controllers/KeyBindingsController.java @@ -91,7 +91,7 @@ public class KeyBindingsController { } /** - * Makes a copy of the keyfactory that does not modify the original. + * Makes a copy of the {@link KeyFactory} that does not modify the original. * @return new keyfactory to be modified */ public KeyFactory copyExistingFactory(){ @@ -109,7 +109,8 @@ public class KeyBindingsController { /** * Creates a listener for the base anchorpane for key presses. - * It updates the current key bindings if required. + * It updates the current key bindings of the {@link KeyFactory} if + * required. */ public void setKeyListener(){ anchor.addEventFilter(KeyEvent.KEY_PRESSED, event -> { @@ -150,8 +151,11 @@ public class KeyBindingsController { System.out.println("reset clicked"); } + /** + * Replace existing {@link KeyFactory} with the modified key bindings. + */ public void save(){ - System.out.println("save clicked"); + keyFactory = newKeyFactory; } }