public class MouseButtonTrigger extends java.lang.Object implements Trigger
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 and Description |
---|
MouseButtonTrigger(int mouseButton)
Create a new
MouseButtonTrigger to receive mouse button events. |
Modifier and Type | Method and Description |
---|---|
int |
getMouseButton() |
java.lang.String |
getName() |
static int |
mouseButtonHash(int mouseButton) |
int |
triggerHashCode()
Returns the hash code for the trigger.
|
public MouseButtonTrigger(int mouseButton)
MouseButtonTrigger
to receive mouse button events.mouseButton
- Mouse button index. See BUTTON_*** constants in
MouseInput
.public int getMouseButton()
public java.lang.String getName()
public static int mouseButtonHash(int mouseButton)
public int triggerHashCode()
Trigger
triggerHashCode
in interface Trigger