Package com.jme3.input.controls
Class MouseButtonTrigger
java.lang.Object
com.jme3.input.controls.MouseButtonTrigger
- All Implemented Interfaces:
Trigger
A
MouseButtonTrigger
is used as a mapping to receive events
from mouse buttons. It is generally expected for a mouse to have at least
a left and right mouse button, but some mice may have a lot more buttons
than that.-
Constructor Summary
ConstructorDescriptionMouseButtonTrigger
(int mouseButton) Create a newMouseButtonTrigger
to receive mouse button events. -
Method Summary
Modifier and TypeMethodDescriptionint
getName()
static int
mouseButtonHash
(int mouseButton) int
Returns the hash code for the trigger.
-
Constructor Details
-
MouseButtonTrigger
public MouseButtonTrigger(int mouseButton) Create a newMouseButtonTrigger
to receive mouse button events.- Parameters:
mouseButton
- Mouse button index. See BUTTON_*** constants inMouseInput
.
-
-
Method Details
-
getMouseButton
public int getMouseButton() -
getName
-
mouseButtonHash
public static int mouseButtonHash(int mouseButton) -
triggerHashCode
public int triggerHashCode()Description copied from interface:Trigger
Returns the hash code for the trigger.- Specified by:
triggerHashCode
in interfaceTrigger
- Returns:
- the hash code for the trigger.
-