Class InputEvent.RawMouseEvent

  • Enclosing class:
    InputEvent

    public static class InputEvent.RawMouseEvent
    extends InputEvent
    A cancellable mouse event fired before key bindings are updated
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int action  
      private int button  
      private int mods  
    • Constructor Summary

      Constructors 
      Constructor Description
      RawMouseEvent​(int button, int action, int mods)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAction()
      Integer representing the mouse button's action.
      int getButton()
      The mouse button that triggered this event.
      int getMods()
      Bit field representing the modifier keys pressed.
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • button

        private final int button
      • action

        private final int action
      • mods

        private final int mods
    • Constructor Detail

      • RawMouseEvent

        public RawMouseEvent​(int button,
                             int action,
                             int mods)
    • Method Detail

      • getButton

        public int getButton()
        The mouse button that triggered this event. https://www.glfw.org/docs/latest/group__buttons.html
        See Also:
        mouse constants starting with "GLFW_MOUSE_BUTTON_"
      • getAction

        public int getAction()
        Integer representing the mouse button's action.
        See Also:
        GLFW.GLFW_PRESS, GLFW.GLFW_RELEASE
      • getMods

        public int getMods()
        Bit field representing the modifier keys pressed. https://www.glfw.org/docs/latest/group__mods.html
        See Also:
        GLFW.GLFW_MOD_SHIFT, GLFW.GLFW_MOD_CONTROL, GLFW.GLFW_MOD_ALT, GLFW.GLFW_MOD_SUPER