InputAction, right button

System: 1.5 Ghz PowerBook G4

OS:

That works, but it does not in my SimpleJMEApplet.



Any idea?



Thanks!

Try running TestSwingControlEditor and change one of the controls to be the right mouse button…that should tell you if it's getting picked up.

Using GameControls instead? :wink:



Actually, I have no idea.  I created the GameControls system because I wasn't a big fan of InputHandler.

How do I use GameControls??? Do you have some doc?



I do not want to display a form to configure controls, I want to set them myself.?



Thanks!





Edit:



I solved it by using simply MouseInput and this trick to disallow button repeat between updates:



http://www.jmonkeyengine.com/jmeforum/index.php?topic=3076.0



Many thanks darkfrog!!



BTW: Any idea on this other issue: http://www.jmonkeyengine.com/jmeforum/index.php?topic=4475.0


You can set them yourself.  Take a look at TestSwingControlEditor…it's a good example of setting controls as well as using them…just ignore the display screen. :wink:

I'll try it, thanks!

hvico said:

If I specify mouse button 1 into "addAction" method:

- 1 sets the action to left click
- 0 has no effect at all
- 2 sets middle button.
- 3 I get an "out-of-bounds" error

Where is my right button?  :(

This was a bug, in deed. The polling methods and the event methods did return different button indices o_O.

I have aligned the indices with the normal (non-awt) indices.