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
FieldsModifier and TypeFieldDescriptionstatic final intMouse wheel axis.static final intMouse X axis.static final intMouse Y axis.static final intLeft mouse button.static final intMiddle mouse button.static final intRight mouse button. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of buttons the mouse has.voidsetCursorVisible(boolean visible) Set whether the mouse cursor should be visible or not.voidsetNativeCursor(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.
-