Package net.minecraftforge.client.event
Class ScreenEvent.MouseDragged
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.MouseInput
net.minecraftforge.client.event.ScreenEvent.MouseDragged
- Direct Known Subclasses:
ScreenEvent.MouseDragged.Post
,ScreenEvent.MouseDragged.Pre
- Enclosing class:
- ScreenEvent
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.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired after the mouse drag is handled, if not handled by the screen and the correspondingScreenEvent.MouseDragged.Pre
is not cancelled.static class
Fired before the mouse drag is handled by the screen.Nested classes/interfaces inherited from class net.minecraftforge.client.event.ScreenEvent
ScreenEvent.BackgroundRendered, ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final double
private final double
private final int
-
Constructor Summary
ConstructorDescriptionMouseDragged
(Screen screen, double mouseX, double mouseY, int mouseButton, double dragX, double dragY) -
Method Summary
Methods inherited from class net.minecraftforge.client.event.ScreenEvent.MouseInput
getMouseX, getMouseY
Methods inherited from class net.minecraftforge.client.event.ScreenEvent
getScreen
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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:
-
mouse constants starting with 'GLFW_MOUSE_BUTTON_'
- the online GLFW documentation
-
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
-