Added infinite scrolling

This commit is contained in:
2015-06-13 19:32:03 +02:00
parent 2131f845b5
commit 5b5f4e0ce1
+3 -2
View File
@@ -23,6 +23,7 @@ public class JoystickHandler implements KeyListener{
List<JoystickListener> listeners;
Set<Integer> 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);
}