Class ScreenEvent.MouseScrolled
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
net.neoforged.neoforge.client.event.ScreenEvent.MouseInput
net.neoforged.neoforge.client.event.ScreenEvent.MouseScrolled
- Direct Known Subclasses:
ScreenEvent.MouseScrolled.Post
,ScreenEvent.MouseScrolled.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.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired after the mouse scroll is handled, if not handled by the screen and the correspondingScreenEvent.MouseScrolled.Pre
is not cancelled.static class
Fired before the mouse scroll is handled by the screen.Nested classes/interfaces inherited from class net.neoforged.neoforge.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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final double
private final double
-
Constructor Summary
ConstructorDescriptionMouseScrolled
(Screen screen, double mouseX, double mouseY, double scrollDeltaX, double scrollDeltaY) -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the amount of change / delta of the mouse scroll on the X axis.double
Returns the amount of change / delta of the mouse scroll on the Y axis.Methods inherited from class net.neoforged.neoforge.client.event.ScreenEvent.MouseInput
getMouseX, getMouseY
Methods inherited from class net.neoforged.neoforge.client.event.ScreenEvent
getScreen
-
Field Details
-
scrollDeltaX
private final double scrollDeltaX -
scrollDeltaY
private final double scrollDeltaY
-
-
Constructor Details
-
MouseScrolled
@Internal public MouseScrolled(Screen screen, double mouseX, double mouseY, double scrollDeltaX, double scrollDeltaY)
-
-
Method Details
-
getScrollDeltaX
public double getScrollDeltaX()Returns the amount of change / delta of the mouse scroll on the X axis.- Returns:
- the amount of change / delta of the mouse scroll on the X axis
-
getScrollDeltaY
public double getScrollDeltaY()Returns the amount of change / delta of the mouse scroll on the Y axis.- Returns:
- the amount of change / delta of the mouse scroll on the Y axis
-