Class ScreenEvent.MouseDragged

java.lang.Object
net.neoforged.bus.api.Event
Direct Known Subclasses:
ScreenEvent.MouseDragged.Post, ScreenEvent.MouseDragged.Pre
Enclosing class:
ScreenEvent

public abstract static class ScreenEvent.MouseDragged extends ScreenEvent.MouseInput
Fired when the mouse was dragged while a button is being held down. See the two subclasses for listening before and after the normal handling.
See Also:
  • Field Details

    • mouseButton

      private final int mouseButton
    • dragX

      private final double dragX
    • dragY

      private final double dragY
  • Constructor Details

    • MouseDragged

      @Internal public MouseDragged(Screen screen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY)
  • Method Details

    • getMouseButton

      public int getMouseButton()
      Returns the mouse button's input code.
      Returns:
      the mouse button's input code
      See Also:
    • getDragX

      public double getDragX()
      Returns amount of mouse drag along the X axis.
      Returns:
      amount of mouse drag along the X axis
    • getDragY

      public double getDragY()
      Returns amount of mouse drag along the Y axis.
      Returns:
      amount of mouse drag along the Y axis