Package net.minecraftforge.client.event
Class InputEvent.MouseButton
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.InputEvent
net.minecraftforge.client.event.InputEvent.MouseButton
- Direct Known Subclasses:
InputEvent.MouseButton.Post
,InputEvent.MouseButton.Pre
- Enclosing class:
- InputEvent
Fired when a mouse button is pressed/released. Sub-events get fired
before
and after
this happens.
These events are fired on the main Forge event bus, only on the logical client.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired when a mouse button is pressed/released, after processing.static class
Fired when a mouse button is pressed/released, before being processed by vanilla.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
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the mouse button's action.int
Returns the mouse button's input code.int
Returns a bit field representing the active modifier keys.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 -
action
private final int action -
modifiers
private final int modifiers
-
-
Constructor Details
-
MouseButton
@Internal protected MouseButton(int button, int action, int modifiers)
-
-
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
-
getAction
public int getAction()Returns the mouse button's action.- Returns:
- the mouse button's action
- See Also:
-
getModifiers
public int getModifiers()Returns a bit field representing the active modifier keys.- Returns:
- a bit field representing the active modifier keys
- See Also:
-
CTRL modifier key bit
SHIFT modifier key bit
ALT modifier key bit
SUPER modifier key bit
CAPS LOCK modifier key bit
NUM LOCK modifier key bit
- the online GLFW documentation
-