public class GlfwMouseInput extends java.lang.Object implements MouseInput
update() method. Due to
some of the GLFW button id's there is a conversion method in this class which
will convert the GLFW left, middle and right mouse button to JME3 left,
middle and right button codes.AXIS_WHEEL, AXIS_X, AXIS_Y, BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT| Constructor and Description |
|---|
GlfwMouseInput(LwjglWindow context) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Ceases listening to events from the device.
|
int |
getButtonCount()
Returns the number of buttons the mouse has.
|
long |
getInputTimeNanos() |
void |
initialize()
Initializes the native side to listen into events from the device.
|
boolean |
isInitialized() |
void |
resetContext()
Re-initializes the mouse input context window specific callbacks
|
void |
setCursorVisible(boolean visible)
Set whether the mouse cursor should be visible or not.
|
void |
setInputListener(RawInputListener listener)
Sets the input listener to receive events from this device.
|
void |
setNativeCursor(JmeCursor jmeCursor)
Sets the cursor to use.
|
void |
update()
Queries the device for input.
|
public GlfwMouseInput(LwjglWindow context)
public void initialize()
Inputinitialize in interface Inputpublic void resetContext()
public boolean isInitialized()
isInitialized in interface InputInput.initialize(),
Input.destroy()public int getButtonCount()
MouseInputgetButtonCount in interface MouseInputpublic void update()
Inputupdate in interface InputInput.setInputListener(com.jme3.input.RawInputListener)public void destroy()
Inputpublic void setCursorVisible(boolean visible)
MouseInputsetCursorVisible in interface MouseInputvisible - Whether the mouse cursor should be visible or not.public void setInputListener(RawInputListener listener)
InputsetInputListener in interface Inputpublic long getInputTimeNanos()
getInputTimeNanos in interface Inputpublic void setNativeCursor(JmeCursor jmeCursor)
MouseInputsetNativeCursor in interface MouseInputjmeCursor - The cursor to use.