Class ScreenMouseEvents
java.lang.Object
net.fabricmc.fabric.api.client.screen.v1.ScreenMouseEvents
Events related to use of the mouse in a
Screen
.
All of these events work on top of a specific screen instance.
Subscriptions will only last as long as the screen itself, they'll disappear once the screen gets refreshed, closed or replaced.
Use ScreenEvents.BEFORE_INIT
to register the desired events every time it is necessary.
Events are fired in the following order:
AllowX -> BeforeX -> AfterX
If the result of the Allow event is false, then Before and After are not called.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionafterMouseClick
(Screen screen) An event that is called after a mouse click is processed for a screen.afterMouseRelease
(Screen screen) An event that is called after the release of a mouse click is processed for a screen.afterMouseScroll
(Screen screen) An event that is called after mouse scrolling is processed for a screen.allowMouseClick
(Screen screen) An event that checks if the mouse click should be allowed.allowMouseRelease
(Screen screen) An event that checks if the mouse click should be allowed to release in a screen.allowMouseScroll
(Screen screen) An event that is checks if the mouse should be allowed to scroll in a screen.beforeMouseClick
(Screen screen) An event that is called before a mouse click is processed for a screen.beforeMouseRelease
(Screen screen) An event that is called before the release of a mouse click is processed for a screen.beforeMouseScroll
(Screen screen) An event that is called after mouse scrolling is processed for a screen.
-
Method Details
-
allowMouseClick
An event that checks if the mouse click should be allowed.- Returns:
- the event
-
beforeMouseClick
An event that is called before a mouse click is processed for a screen.- Returns:
- the event
-
afterMouseClick
An event that is called after a mouse click is processed for a screen.- Returns:
- the event
-
allowMouseRelease
An event that checks if the mouse click should be allowed to release in a screen.- Returns:
- the event
-
beforeMouseRelease
An event that is called before the release of a mouse click is processed for a screen.- Returns:
- the event
-
afterMouseRelease
An event that is called after the release of a mouse click is processed for a screen.- Returns:
- the event
-
allowMouseScroll
An event that is checks if the mouse should be allowed to scroll in a screen.This event tracks amount of vertical and horizontal scroll.
- Returns:
- the event
-
beforeMouseScroll
An event that is called after mouse scrolling is processed for a screen.This event tracks amount of vertical and horizontal scroll.
- Returns:
- the event
-
afterMouseScroll
An event that is called after mouse scrolling is processed for a screen.This event tracks amount a mouse was scrolled both vertically and horizontally.
- Returns:
- the event
-