Class MouseButtonTrigger

java.lang.Object
com.jme3.input.controls.MouseButtonTrigger
All Implemented Interfaces:
Trigger

public class MouseButtonTrigger extends Object implements 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 Details

    • MouseButtonTrigger

      public MouseButtonTrigger(int mouseButton)
      Create a new MouseButtonTrigger to receive mouse button events.
      Parameters:
      mouseButton - Mouse button index. See BUTTON_*** constants in MouseInput.
  • Method Details

    • getMouseButton

      public int getMouseButton()
    • getName

      public String getName()
      Specified by:
      getName in interface Trigger
      Returns:
      A user friendly name for the trigger.
    • 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 interface Trigger
      Returns:
      the hash code for the trigger.