diff options
-rw-r--r-- | Spear/Window.hs | 4 |
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 | |||
185 | onKey events window key _ GLFW.KeyState'Released _ = addEvent events $ KeyUp (fromGLFWkey key) | 184 | onKey events window key _ GLFW.KeyState'Released _ = addEvent events $ KeyUp (fromGLFWkey key) |
186 | onKey events window key _ GLFW.KeyState'Repeating _ = return () | 185 | onKey events window key _ GLFW.KeyState'Repeating _ = return () |
187 | 186 | ||
188 | onChar :: MVar [InputEvent] -> GLFW.CharCallback | ||
189 | onChar events window char = addEvent events $ KeyDown . fromGLFWkey . read $ [char] | ||
190 | |||
191 | onMouseButton :: MVar [InputEvent] -> GLFW.MouseButtonCallback | 187 | onMouseButton :: MVar [InputEvent] -> GLFW.MouseButtonCallback |
192 | onMouseButton events window button GLFW.MouseButtonState'Pressed _ = addEvent events $ MouseDown (fromGLFWbutton button) | 188 | onMouseButton events window button GLFW.MouseButtonState'Pressed _ = addEvent events $ MouseDown (fromGLFWbutton button) |
193 | onMouseButton events window button GLFW.MouseButtonState'Released _ = addEvent events $ MouseUp (fromGLFWbutton button) | 189 | onMouseButton events window button GLFW.MouseButtonState'Released _ = addEvent events $ MouseUp (fromGLFWbutton button) |