aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Spear/Window.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/Spear/Window.hs b/Spear/Window.hs
index aafcb59..453f67d 100644
--- a/Spear/Window.hs
+++ b/Spear/Window.hs
@@ -130,7 +130,6 @@ setup (w, h) windowTitle = do
130 GLFW.setWindowCloseCallback window . Just $ onWindowClose closeRequest 130 GLFW.setWindowCloseCallback window . Just $ onWindowClose closeRequest
131 GLFW.setWindowSizeCallback window . Just $ onResize windowEvents 131 GLFW.setWindowSizeCallback window . Just $ onResize windowEvents
132 GLFW.setKeyCallback window . Just $ onKey inputEvents 132 GLFW.setKeyCallback window . Just $ onKey inputEvents
133 GLFW.setCharCallback window . Just $ onChar inputEvents
134 GLFW.setMouseButtonCallback window . Just $ onMouseButton inputEvents 133 GLFW.setMouseButtonCallback window . Just $ onMouseButton inputEvents
135 GLFW.setCursorPosCallback window . Just $ onMouseMove mousePos inputEvents 134 GLFW.setCursorPosCallback window . Just $ onMouseMove mousePos inputEvents
136 135
@@ -185,9 +184,6 @@ onKey events window key _ GLFW.KeyState'Pressed _ = addEvent events $ KeyDown
185onKey events window key _ GLFW.KeyState'Released _ = addEvent events $ KeyUp (fromGLFWkey key) 184onKey events window key _ GLFW.KeyState'Released _ = addEvent events $ KeyUp (fromGLFWkey key)
186onKey events window key _ GLFW.KeyState'Repeating _ = return () 185onKey events window key _ GLFW.KeyState'Repeating _ = return ()
187 186
188onChar :: MVar [InputEvent] -> GLFW.CharCallback
189onChar events window char = addEvent events $ KeyDown . fromGLFWkey . read $ [char]
190
191onMouseButton :: MVar [InputEvent] -> GLFW.MouseButtonCallback 187onMouseButton :: MVar [InputEvent] -> GLFW.MouseButtonCallback
192onMouseButton events window button GLFW.MouseButtonState'Pressed _ = addEvent events $ MouseDown (fromGLFWbutton button) 188onMouseButton events window button GLFW.MouseButtonState'Pressed _ = addEvent events $ MouseDown (fromGLFWbutton button)
193onMouseButton events window button GLFW.MouseButtonState'Released _ = addEvent events $ MouseUp (fromGLFWbutton button) 189onMouseButton events window button GLFW.MouseButtonState'Released _ = addEvent events $ MouseUp (fromGLFWbutton button)