MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / addMouseHandler

Method addMouseHandler

src/main/java/field/graphics/Window.java:689–692  ·  view source on GitHub ↗

A keyboard handler is a Function , Boolean>>, that is a function that takes a transition between two MouseStates and returns a boolean, whether or not it ever wants to be called again

(Function<Event<MouseState>, Boolean> h)

Source from the content-addressed store, hash-verified

687 if ((after.mods & GLFW_MOD_CONTROL) != 0)
688 after.keyboardState = after.keyboardState.withKey(GLFW_KEY_LEFT_CONTROL, true);
689 else after.keyboardState = after.keyboardState.withKey(GLFW_KEY_LEFT_CONTROL, false)
690 .withKey(GLFW_KEY_RIGHT_CONTROL, false);
691 if ((after.mods & GLFW_MOD_ALT) != 0)
692 after.keyboardState = after.keyboardState.withKey(GLFW_KEY_LEFT_ALT, true);
693 else after.keyboardState = after.keyboardState.withKey(GLFW_KEY_LEFT_ALT, false)
694 .withKey(GLFW_KEY_RIGHT_ALT, false);
695 if ((after.mods & GLFW_MOD_SUPER) != 0)

Callers 4

window.box.jsFile · 0.80
OpenMethod · 0.80
popOutMethod · 0.80
attachToWindowMethod · 0.80

Calls 1

addMethod · 0.45

Tested by

no test coverage detected