From 5b5f4e0ce1af93707c8edd573ccd66140f983b60 Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Sat, 13 Jun 2015 19:32:03 +0200 Subject: [PATCH] Added infinite scrolling --- control/joystick/JoystickHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/control/joystick/JoystickHandler.java b/control/joystick/JoystickHandler.java index f4a90c0..cfc08cf 100644 --- a/control/joystick/JoystickHandler.java +++ b/control/joystick/JoystickHandler.java @@ -23,6 +23,7 @@ public class JoystickHandler implements KeyListener{ List listeners; Set keys; + public static boolean REPEAT = false; public static Joystick j = new Joystick();; public JoystickHandler() @@ -157,7 +158,7 @@ public class JoystickHandler implements KeyListener{ keys.add(e.getKeyCode()); updateJoystickPosition(); - if(!keys.equals(keysCopy)) + if(REPEAT || !keys.equals(keysCopy) ) { onJoystickMoved(j); } @@ -173,7 +174,7 @@ public class JoystickHandler implements KeyListener{ keys.remove(e.getKeyCode()); updateJoystickPosition(); - if(!keys.equals(keysCopy)) + if(REPEAT || !keys.equals(keysCopy)) { onJoystickMoved(j); }