Package net.minecraftforge.client.event
Class InputEvent.MouseScrollingEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.InputEvent
net.minecraftforge.client.event.InputEvent.MouseScrollingEvent
- Enclosing class:
- InputEvent
Fired when a mouse scroll wheel is used outside of a screen and a player is loaded, before being
processed by vanilla.
This event is cancellable, and does not have a result. If the event is cancelled, then the mouse scroll event will not be processed further.
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.InputEvent
InputEvent.InteractionKeyMappingTriggered, InputEvent.Key, InputEvent.MouseButton, InputEvent.MouseScrollingEvent
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
-
Constructor Summary
ConstructorDescriptionMouseScrollingEvent
(double deltaX, double deltaY, boolean leftDown, boolean middleDown, boolean rightDown, double mouseX, double mouseY) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the amount of change / delta of the mouse scroll in the vertical direction.double
Returns the amount of change / delta of the mouse scroll in the horizontal direction.double
Returns the X position of the mouse cursor.double
Returns the Y position of the mouse cursor.boolean
Returnstrue
if the left mouse button is pressed.boolean
Returnstrue
if the middle mouse button is pressed.boolean
Returnstrue
if the right mouse button is pressed.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
deltaX
private final double deltaX -
deltaY
private final double deltaY -
mouseX
private final double mouseX -
mouseY
private final double mouseY -
leftDown
private final boolean leftDown -
middleDown
private final boolean middleDown -
rightDown
private final boolean rightDown
-
-
Constructor Details
-
MouseScrollingEvent
@Internal public MouseScrollingEvent(double deltaX, double deltaY, boolean leftDown, boolean middleDown, boolean rightDown, double mouseX, double mouseY)
-
-
Method Details
-
getDeltaX
public double getDeltaX()Returns the amount of change / delta of the mouse scroll in the vertical direction.- Returns:
- the amount of change / delta of the mouse scroll in the vertical direction
-
getDeltaY
public double getDeltaY()Returns the amount of change / delta of the mouse scroll in the horizontal direction.- Returns:
- the amount of change / delta of the mouse scroll in the horizontal direction
-
isLeftDown
public boolean isLeftDown()Returnstrue
if the left mouse button is pressed.- Returns:
true
if the left mouse button is pressed
-
isRightDown
public boolean isRightDown()Returnstrue
if the right mouse button is pressed.- Returns:
true
if the right mouse button is pressed
-
isMiddleDown
public boolean isMiddleDown()Returnstrue
if the middle mouse button is pressed.- Returns:
true
if the middle mouse button is pressed
-
getMouseX
public double getMouseX()Returns the X position of the mouse cursor.- Returns:
- the X position of the mouse cursor
-
getMouseY
public double getMouseY()Returns the Y position of the mouse cursor.- Returns:
- the Y position of the mouse cursor
-