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