|
|
@ -49,7 +49,6 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
public double nanaX = 0; |
|
|
|
public double nanaX = 0; |
|
|
|
public double nanaY = 0; |
|
|
|
public double nanaY = 0; |
|
|
|
public int button = 0; |
|
|
|
public int button = 0; |
|
|
|
private MouseScrollValue scrollWheel=null; |
|
|
|
|
|
|
|
public static final int UPDATE_LOOP_FRAMERATE = 244; |
|
|
|
public static final int UPDATE_LOOP_FRAMERATE = 244; |
|
|
|
public static final long UPDATE_LOOP_NANOTIME = (long)((1d/UPDATE_LOOP_FRAMERATE)*1000000000l); |
|
|
|
public static final long UPDATE_LOOP_NANOTIME = (long)((1d/UPDATE_LOOP_FRAMERATE)*1000000000l); |
|
|
|
public static final double UPDATE_MULT = 1d / UPDATE_LOOP_FRAMERATE; |
|
|
|
public static final double UPDATE_MULT = 1d / UPDATE_LOOP_FRAMERATE; |
|
|
@ -101,6 +100,7 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
Mouse.releaseMap.clear(); |
|
|
|
Mouse.releaseMap.clear(); |
|
|
|
Key.KEYS_PRESS.clear(); |
|
|
|
Key.KEYS_PRESS.clear(); |
|
|
|
Key.KEYS_RELEASE.clear(); |
|
|
|
Key.KEYS_RELEASE.clear(); |
|
|
|
|
|
|
|
Mouse.mouseWheel=MouseScrollValue.NONE; |
|
|
|
dt -= UPDATE_LOOP_NANOTIME; |
|
|
|
dt -= UPDATE_LOOP_NANOTIME; |
|
|
|
TIME += UPDATE_LOOP_NANOTIME; |
|
|
|
TIME += UPDATE_LOOP_NANOTIME; |
|
|
|
} |
|
|
|
} |
|
|
@ -181,7 +181,7 @@ public class Panel extends JPanel implements Runnable,KeyListener { |
|
|
|
//-1 is UP, 1 is DOWN
|
|
|
|
//-1 is UP, 1 is DOWN
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseWheelMoved(MouseWheelEvent e) { |
|
|
|
public void mouseWheelMoved(MouseWheelEvent e) { |
|
|
|
scrollWheel=MouseScrollValue.getValue(e.getWheelRotation()); |
|
|
|
Mouse.mouseWheel=MouseScrollValue.getValue(e.getWheelRotation()); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|