- remove input workaround altogether
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8664 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
b9f34d3ca5
commit
8b5ecd5a7d
@ -90,45 +90,57 @@ public final class SceneViewerTopComponent extends TopComponent {
|
|||||||
|
|
||||||
//We add a mouse wheel listener to the top conmponent in order to correctly dispatch the event ot the cam controller
|
//We add a mouse wheel listener to the top conmponent in order to correctly dispatch the event ot the cam controller
|
||||||
//the oGLPanel may naver have the focus.
|
//the oGLPanel may naver have the focus.
|
||||||
addMouseWheelListener(new MouseWheelListener() {
|
// addMouseWheelListener(new MouseWheelListener() {
|
||||||
|
//
|
||||||
public void mouseWheelMoved(final MouseWheelEvent e) {
|
// public void mouseWheelMoved(final MouseWheelEvent e) {
|
||||||
SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
// SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
||||||
|
//
|
||||||
public Void call() throws Exception {
|
// public Void call() throws Exception {
|
||||||
String action = "MouseWheel-";
|
// String action = "MouseWheel-";
|
||||||
if (e.getWheelRotation() < 0) {
|
// if (e.getWheelRotation() < 0) {
|
||||||
action = "MouseWheel";
|
// action = "MouseWheel";
|
||||||
}
|
// }
|
||||||
app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
|
// app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
addKeyListener(new KeyListener() {
|
// addKeyListener(new KeyListener() {
|
||||||
|
//
|
||||||
public void keyTyped(KeyEvent evt) {
|
// public void keyTyped(KeyEvent evt) {
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
public void keyPressed(KeyEvent evt) {
|
// public void keyPressed(final KeyEvent evt) {
|
||||||
int code = AwtKeyInput.convertAwtKey(evt.getKeyCode());
|
// SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
||||||
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, false);
|
//
|
||||||
keyEvent.setTime(evt.getWhen());
|
// public Void call() throws Exception {
|
||||||
if (app.getActiveCameraController() != null) {
|
// int code = AwtKeyInput.convertAwtKey(evt.getKeyCode());
|
||||||
app.getActiveCameraController().onKeyEvent(keyEvent);
|
// KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), true, false);
|
||||||
}
|
// keyEvent.setTime(evt.getWhen());
|
||||||
}
|
// if (app.getActiveCameraController() != null) {
|
||||||
|
// app.getActiveCameraController().onKeyEvent(keyEvent);
|
||||||
public void keyReleased(KeyEvent evt) {
|
// }
|
||||||
int code = AwtKeyInput.convertAwtKey(evt.getKeyCode());
|
// return null;
|
||||||
KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, false);
|
// }
|
||||||
keyEvent.setTime(evt.getWhen());
|
// });
|
||||||
if (app.getActiveCameraController() != null) {
|
// }
|
||||||
app.getActiveCameraController().onKeyEvent(keyEvent);
|
//
|
||||||
}
|
// public void keyReleased(final KeyEvent evt) {
|
||||||
}
|
// SceneApplication.getApplication().enqueue(new Callable<Void>() {
|
||||||
});
|
//
|
||||||
|
// public Void call() throws Exception {
|
||||||
|
// int code = AwtKeyInput.convertAwtKey(evt.getKeyCode());
|
||||||
|
// KeyInputEvent keyEvent = new KeyInputEvent(code, evt.getKeyChar(), false, false);
|
||||||
|
// keyEvent.setTime(evt.getWhen());
|
||||||
|
// if (app.getActiveCameraController() != null) {
|
||||||
|
// app.getActiveCameraController().onKeyEvent(keyEvent);
|
||||||
|
// }
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user