|
|
|
@ -24,7 +24,6 @@ |
|
|
|
|
*/ |
|
|
|
|
package com.jme3.gde.core.sceneviewer; |
|
|
|
|
|
|
|
|
|
import com.jme3.gde.core.Installer; |
|
|
|
|
import com.jme3.gde.core.filters.FilterExplorerTopComponent; |
|
|
|
|
import com.jme3.gde.core.scene.SceneApplication; |
|
|
|
|
import com.jme3.gde.core.scene.SceneRequest; |
|
|
|
@ -49,7 +48,6 @@ import org.openide.awt.UndoRedo; |
|
|
|
|
import org.openide.util.Exceptions; |
|
|
|
|
import org.openide.util.HelpCtx; |
|
|
|
|
import org.openide.util.Lookup; |
|
|
|
|
import org.openide.util.NbPreferences; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Top component which displays something. |
|
|
|
@ -80,6 +78,7 @@ public final class SceneViewerTopComponent extends TopComponent { |
|
|
|
|
app = SceneApplication.getApplication(); |
|
|
|
|
// oglCanvas = ((JmeCanvasContext) app.getContext()).getCanvas();
|
|
|
|
|
oglCanvas = app.getMainPanel(); |
|
|
|
|
oglCanvas.setFocusable(false); |
|
|
|
|
oGLPanel.add(oglCanvas); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
@ -92,7 +91,7 @@ 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
|
|
|
|
|
//the oGLPanel may naver have the focus.
|
|
|
|
|
if ("true".equals(NbPreferences.forModule(Installer.class).get("use_lwjgl_canvas", "false"))) { |
|
|
|
|
// if ("true".equals(NbPreferences.forModule(Installer.class).get("use_lwjgl_canvas", "false"))) {
|
|
|
|
|
addMouseWheelListener(new MouseWheelListener() { |
|
|
|
|
|
|
|
|
|
public void mouseWheelMoved(final MouseWheelEvent e) { |
|
|
|
@ -103,7 +102,9 @@ public final class SceneViewerTopComponent extends TopComponent { |
|
|
|
|
if (e.getWheelRotation() < 0) { |
|
|
|
|
action = "MouseWheel"; |
|
|
|
|
} |
|
|
|
|
if (app.getActiveCameraController() != null) { |
|
|
|
|
app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0); |
|
|
|
|
} |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -144,7 +145,7 @@ public final class SceneViewerTopComponent extends TopComponent { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|