Use separate connection methods (onConnected/onDisconnected).accellbaker
parent
2f6185b5cf
commit
b9b4a2d75b
@ -1,7 +1,21 @@ |
||||
package com.jme3.input; |
||||
|
||||
/** |
||||
* Listens for the state of a joystick connection. |
||||
* @author jayfella |
||||
*/ |
||||
public interface JoystickConnectionListener { |
||||
|
||||
void connectionChanged(int joystickId, boolean connected); |
||||
/** |
||||
* Occurs when a new joystick has been detected. |
||||
* @param joystick the joystick that has been detected. |
||||
*/ |
||||
void onConnected(Joystick joystick); |
||||
|
||||
/** |
||||
* Occurs when an existing joystick has been disconnected. |
||||
* @param joystick the joystick that has been disconnected. |
||||
*/ |
||||
void onDisconnected(Joystick joystick); |
||||
|
||||
} |
||||
|
Loading…
Reference in new issue