Modifier and Type | Class and Description |
---|---|
protected class |
GlfwJoystickInput.GlfwJoystick |
AXIS_POV_X, AXIS_POV_Y
Constructor and Description |
---|
GlfwJoystickInput() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Ceases listening to events from the device.
|
void |
fireJoystickConnectedEvent(int jid) |
void |
fireJoystickDisconnectedEvent(int jid) |
long |
getInputTimeNanos() |
void |
initialize()
Initializes the native side to listen into events from the device.
|
boolean |
isInitialized() |
Joystick[] |
loadJoysticks(InputManager inputManager)
Loads a list of joysticks from the system.
|
void |
reloadJoysticks() |
void |
setInputListener(RawInputListener listener)
Sets the input listener to receive events from this device.
|
void |
setJoyRumble(int joyId,
float amount)
Causes the joystick at
joyId index to rumble with
the given amount. |
void |
update()
Queries the device for input.
|
public void setJoyRumble(int joyId, float amount)
JoyInput
joyId
index to rumble with
the given amount.setJoyRumble
in interface JoyInput
joyId
- The joystick indexamount
- Rumble amount. Should be between 0 and 1.public void fireJoystickConnectedEvent(int jid)
public void fireJoystickDisconnectedEvent(int jid)
public void reloadJoysticks()
public Joystick[] loadJoysticks(InputManager inputManager)
JoyInput
loadJoysticks
in interface JoyInput
inputManager
- The input manager requesting to load joystickspublic void initialize()
Input
initialize
in interface Input
public void update()
Input
update
in interface Input
Input.setInputListener(com.jme3.input.RawInputListener)
public void destroy()
Input
public boolean isInitialized()
isInitialized
in interface Input
Input.initialize()
,
Input.destroy()
public void setInputListener(RawInputListener listener)
Input
setInputListener
in interface Input
listener
- the desired listenerpublic long getInputTimeNanos()
getInputTimeNanos
in interface Input