Package net.minecraftforge.client.event
Class InputEvent.MouseInputEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.InputEvent
net.minecraftforge.client.event.InputEvent.MouseInputEvent
- Enclosing class:
- InputEvent
This event fires when a mouse input is detected.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.InputEvent
InputEvent.ClickInputEvent, InputEvent.KeyInputEvent, InputEvent.MouseInputEvent, InputEvent.MouseScrollEvent, InputEvent.RawMouseEventNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintInteger representing the mouse button's action.intThe mouse button that triggered this event.intBit field representing the modifier keys pressed.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
button
private final int button -
action
private final int action -
modifiers
private final int modifiers
-
-
Constructor Details
-
MouseInputEvent
public MouseInputEvent(int button, int action, int modifiers)
-
-
Method Details
-
getButton
public int getButton()The mouse button that triggered this event. https://www.glfw.org/docs/latest/group__buttons.html- See Also:
-
mouse constants starting with "GLFW_MOUSE_BUTTON_"
-
getAction
public int getAction()Integer representing the mouse button's action.- See Also:
-
GLFW.GLFW_PRESSGLFW.GLFW_RELEASE
-
getModifiers
public int getModifiers()Bit field representing the modifier keys pressed. https://www.glfw.org/docs/latest/group__mods.html- See Also:
-
GLFW.GLFW_MOD_SHIFTGLFW.GLFW_MOD_CONTROLGLFW.GLFW_MOD_ALTGLFW.GLFW_MOD_SUPER
-