Hi,
i'm sorry to bother you again but i encountered another problem. I want to display an Button on an Applet and with a click on it, the applet's camera shall be moved.
I managed to display the Button with Fenggui (tried JMEDesktop/Swing before - weird exceptions) but i can't get it to reacto to events.
My Applet is mostly copied from SimpleJMEApplet, i tried to exchange the input from FirstpersonInput with the FengJMEInputHandler from Wiki but the Button was still not reacting. I also tried to use the FengJMEListener but that had no effect too (it has to be added to MouseInput.get().addListener ?).
Would be glad if someone can help me
Thanks
VR
EDIT: Oh and i have to use JME1.0 - Fenggui is Alpha 10(Rev 359 - latest from Sourceforge)
hi! same problem… how do you solved it?
buttons dont react, windows dont move… I debug the FengJMEInputHandler and it is calling the disp.fireXXXEvent methods…
it seems to be something related to threading issues?
:?
Problem solved. the problem was caused because when running inside applet, FengJMEInputHandler works with the vertical coordinate inverted. I solved the issue creating a m_height member in the FengJMEInputHandler, passing the height of the canvas in the constructor, and using that value to invert the Y coordinate in all the mouse-related event methods. It now works fine.
I think the inverted mouse results somehow from the awt input, that is used in the applets.
I fixed this by using the newer applet implementations.
http://www.jmonkeyengine.com/jmeforum/index.php?topic=11263.0
hi! that are great news! I update today the jme project via SVN, and got your new classes. I begin to play with them, trying to setup a basic fenggui scene, but I found a problem with the type of the canvas.
in my older applet, in order to make it works, I had to use the following code:
LWJGLCanvas glCanvas = (LWJGLCanvas)DisplaySystem.getDisplaySystem().createCanvas(canvasWidth, canvasHeight);
and, then I can init my fenggui display with:
m_GuiDisplay = new org.fenggui.Display(new org.fenggui.binding.render.lwjgl.AWTGLCanvasBinding(glCanvas));
I found a way to make it works changing things in the StandardApplet class, changing the canvas from awt.canvas to LWJGLCanvas and adjusting related code.