Package net.minecraftforge.client.event
Class ScreenEvent.MouseButtonPressed
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ScreenEvent
net.minecraftforge.client.event.ScreenEvent.MouseInput
net.minecraftforge.client.event.ScreenEvent.MouseButtonPressed
- Direct Known Subclasses:
ScreenEvent.MouseButtonPressed.Post
,ScreenEvent.MouseButtonPressed.Pre
- Enclosing class:
- ScreenEvent
Fired when a mouse button is pressed.
See the two subclasses for listening before and after the normal handling.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired after the mouse click is handled, if the correspondingScreenEvent.MouseButtonPressed.Pre
was not cancelled.static class
Fired before the mouse click 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
-
Constructor Summary
-
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
-
button
private final int button
-
-
Constructor Details
-
MouseButtonPressed
-
-
Method Details
-
getButton
public int getButton()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
-