Class GLFWWindow.InputAdapter
java.lang.Object
com.blackrook.gloop.glfw.GLFWWindow.InputAdapter
- All Implemented Interfaces:
GLFWWindow.InputListener
- Enclosing class:
GLFWWindow
An implementation of
GLFWWindow.InputListener that provides a blank, no-op
implementation so that only the desired functions need overriding.- Author:
- Matthew Tropiano
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonKeyPress(GLFWWindow window, int glfwKey, int scanCode, int modFlags) Called when a key is pressed.voidonKeyRelease(GLFWWindow window, int glfwKey, int scanCode, int modFlags) Called when a key is released.voidonKeyRepeated(GLFWWindow window, int glfwKey, int scanCode, int modFlags) Called when a key is repeat-fired via being held during a press.voidonKeyTyped(GLFWWindow window, char c) Called when a key character is typed (character).voidonMouseButtonPress(GLFWWindow window, int glfwButton, int modFlags) Called when a mouse button is pressed.voidonMouseButtonRelease(GLFWWindow window, int glfwButton, int modFlags) Called when a mouse button is released.voidonMousePosition(GLFWWindow window, double x, double y) Called when the mouse cursor is moved in the window.voidonScroll(GLFWWindow window, double x, double y) Called when a scrolling action occurs.
-
Constructor Details
-
InputAdapter
public InputAdapter()
-
-
Method Details
-
onKeyPress
Description copied from interface:GLFWWindow.InputListenerCalled when a key is pressed.- Specified by:
onKeyPressin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.glfwKey- the key code as a GLFW id.scanCode- the system-specific scancode.modFlags- the key modifier flags active.
-
onKeyRepeated
Description copied from interface:GLFWWindow.InputListenerCalled when a key is repeat-fired via being held during a press.- Specified by:
onKeyRepeatedin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.glfwKey- the key code as a GLFW id.scanCode- the system-specific scancode.modFlags- the key modifier flags active.
-
onKeyRelease
Description copied from interface:GLFWWindow.InputListenerCalled when a key is released.- Specified by:
onKeyReleasein interfaceGLFWWindow.InputListener- Parameters:
window- the source window.glfwKey- the key code as a GLFW id.scanCode- the system-specific scancode.modFlags- the key modifier flags active.
-
onKeyTyped
Description copied from interface:GLFWWindow.InputListenerCalled when a key character is typed (character).- Specified by:
onKeyTypedin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.c- the key character typed.
-
onMousePosition
Description copied from interface:GLFWWindow.InputListenerCalled when the mouse cursor is moved in the window.- Specified by:
onMousePositionin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.x- the mouse cursor position in the window, x-axis.y- the mouse cursor position in the window, y-axis.
-
onMouseButtonPress
Description copied from interface:GLFWWindow.InputListenerCalled when a mouse button is pressed.- Specified by:
onMouseButtonPressin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.glfwButton- the mouse button code as a GLFW id.modFlags- the key modifier flags active.
-
onMouseButtonRelease
Description copied from interface:GLFWWindow.InputListenerCalled when a mouse button is released.- Specified by:
onMouseButtonReleasein interfaceGLFWWindow.InputListener- Parameters:
window- the source window.glfwButton- the mouse button code as a GLFW id.modFlags- the key modifier flags active.
-
onScroll
Description copied from interface:GLFWWindow.InputListenerCalled when a scrolling action occurs.- Specified by:
onScrollin interfaceGLFWWindow.InputListener- Parameters:
window- the source window.x- the scroll amount, x-axis.y- the scroll amount, y-axis.
-