From 63bb9eb070b2b41012050c6c24343a4e9937efa5 Mon Sep 17 00:00:00 2001 From: Marc Sunet Date: Mon, 27 Aug 2012 12:43:15 +0200 Subject: Renamed keystate to buttonstate in getMouse --- Spear/App/Input.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Spear/App/Input.hs b/Spear/App/Input.hs index 8165d8b..3a6090f 100644 --- a/Spear/App/Input.hs +++ b/Spear/App/Input.hs @@ -99,15 +99,16 @@ getMouse oldMouse = prop' xpos _ MouseDX = xpos - property oldMouse MouseX prop' _ ypos MouseDY = ypos - property oldMouse MouseY - buttons = fmap toEnum [0..fromEnum (maxBound :: MouseButton)] - getKeystate = fmap (V.fromList . fmap ((==) GLFW.Press)) . - mapM GLFW.getMouseButton . - fmap toGLFWbutton $ buttons + buttons = fmap toEnum [0..fromEnum (maxBound :: MouseButton)] + getButtonState = + fmap (V.fromList . fmap ((==) GLFW.Press)) . + mapM GLFW.getMouseButton . + fmap toGLFWbutton $ buttons in do Position xpos ypos <- get GLFW.mousePos - keystate <- getKeystate + buttonState <- getButtonState return $ Mouse - { button = getButton keystate + { button = getButton buttonState , property = prop' (fromIntegral xpos) (fromIntegral ypos) } -- cgit v1.2.3