diff options
| author | 3gg <3gg@shellblade.net> | 2024-05-24 10:11:43 -0700 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2024-05-24 10:11:43 -0700 |
| commit | 9553955a151e369f23dc6fa2f532a82b280879cc (patch) | |
| tree | c6d31dc0dce09c76a7b7a97e5a67a35330e38416 | |
| parent | b4321a949f473a5877e0084c6845704a924f07a4 (diff) | |
Remove unnecessary char callback.
| -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) |
