aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-05-24 10:11:43 -0700
committer3gg <3gg@shellblade.net>2024-05-24 10:11:43 -0700
commit9553955a151e369f23dc6fa2f532a82b280879cc (patch)
treec6d31dc0dce09c76a7b7a97e5a67a35330e38416
parentb4321a949f473a5877e0084c6845704a924f07a4 (diff)
Remove unnecessary char callback.
-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)