Interface ClientScreenInputEvent.MouseDragged

Enclosing interface:
ClientScreenInputEvent

public static interface ClientScreenInputEvent.MouseDragged
  • Method Summary

    Modifier and Type
    Method
    Description
    mouseDragged(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, double mouseX1, double mouseY1, int button, double mouseX2, double mouseY2)
    Invoked whenever the mouse is dragged across a screen.
  • Method Details

    • mouseDragged

      EventResult mouseDragged(net.minecraft.client.Minecraft client, net.minecraft.client.gui.screens.Screen screen, double mouseX1, double mouseY1, int button, double mouseX2, double mouseY2)
      Invoked whenever the mouse is dragged across a screen. Equivalent to Forge's GuiScreenEvent.MouseDragEvent event.

      This event is handled in two phases PRE and POST, which are invoked before and after the keys have been processed by the screen, respectively.

      Parameters:
      client - The Minecraft instance performing it.
      screen - The screen this keystroke was performed in.
      mouseX1 - The initial scaled x-coordinate of the mouse cursor.
      mouseY1 - The initial scaled y-coordinate of the mouse cursor.
      button - The dragged mouse button.
      mouseX2 - The final scaled x-coordinate of the mouse cursor.
      mouseY2 - The final scaled y-coordinate of the mouse cursor.
      Returns:
      A EventResult determining the outcome of the event, the execution of the vanilla dragging mechanism may be cancelled by the result.