I have followed the wiki's instructions on the way to implement mouse click handling, however each click seems to be counted twice.
Ok, I have the following code to register a click listener -
buttonAction = new InputAction() {
public void performAction( InputActionEvent evt ) {
gameStateVariable.dealWithClick();
}};
ih.addAction(buttonAction, InputHandler.DEVICE_MOUSE, 0 , InputHandler.AXIS_NONE, false );
Where 'ih' is the InputHandler registered to the AbsoluteMouse.
In the update method, I have to call ih.update(f) and I think this is where the problem lies.
Within dealWithClick() i have a system.out.println() which prints something, and everytime I click the mouse this message prints twice so I know things are being double counted.
Any ideas what is wrong?