Package com.jme3.input
Interface MouseInput
- All Superinterfaces:
Input
- All Known Implementing Classes:
AwtMouseInput
,AWTMouseInput
,DummyMouseInput
,GlfwMouseInput
,GlfwMouseInputVR
,LwjglMouseInput
A specific API for interfacing with the mouse.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Mouse wheel axis.static final int
Mouse X axis.static final int
Mouse Y axis.static final int
Left mouse button.static final int
Middle mouse button.static final int
Right mouse button. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the number of buttons the mouse has.void
setCursorVisible
(boolean visible) Set whether the mouse cursor should be visible or not.void
setNativeCursor
(JmeCursor cursor) Sets the cursor to use.Methods inherited from interface com.jme3.input.Input
destroy, getInputTimeNanos, initialize, isInitialized, setInputListener, update
-
Field Details
-
AXIS_X
static final int AXIS_XMouse X axis.- See Also:
-
AXIS_Y
static final int AXIS_YMouse Y axis.- See Also:
-
AXIS_WHEEL
static final int AXIS_WHEELMouse wheel axis.- See Also:
-
BUTTON_LEFT
static final int BUTTON_LEFTLeft mouse button.- See Also:
-
BUTTON_RIGHT
static final int BUTTON_RIGHTRight mouse button.- See Also:
-
BUTTON_MIDDLE
static final int BUTTON_MIDDLEMiddle mouse button.- See Also:
-
-
Method Details
-
setCursorVisible
void setCursorVisible(boolean visible) Set whether the mouse cursor should be visible or not.- Parameters:
visible
- Whether the mouse cursor should be visible or not.
-
getButtonCount
int getButtonCount()Returns the number of buttons the mouse has. Typically 3 for most mice.- Returns:
- the number of buttons the mouse has.
-
setNativeCursor
Sets the cursor to use.- Parameters:
cursor
- The cursor to use.
-