packages feed

netwire-input-glfw 0.0.3 → 0.0.4

raw patch · 2 files changed

+11/−9 lines, 2 filesdep ~GLFW-bdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: GLFW-b, base

API changes (from Hackage documentation)

Files

lib/FRP/Netwire/Input/GLFW.hs view
@@ -86,7 +86,7 @@          MonadKeyboard GLFW.Key (StateT GLFWInputState m) where    keyIsPressed :: GLFW.Key -> StateT GLFWInputState m Bool-  keyIsPressed key = get >>= (return . isKeyPressed key)+  keyIsPressed key = get >>= (return . isKeyDown key)    releaseKey :: GLFW.Key -> StateT GLFWInputState m ()   releaseKey key = get >>= (put . debounceKey key)@@ -120,11 +120,13 @@                                cmode = CursorMode'Enabled,                                scrollAmt = (0, 0) } -isKeyPressed :: GLFW.Key -> GLFWInputState -> Bool-isKeyPressed key = (Map.member key) . keysPressed+isKeyDown :: GLFW.Key -> GLFWInputState -> Bool+isKeyDown key = (Map.member key) . keysPressed  withPressedKey :: GLFWInputState -> GLFW.Key -> (a -> a) -> a -> a-withPressedKey input key fn = if isKeyPressed key input then fn else id+withPressedKey input key fn+  | isKeyDown key input = fn+  | otherwise = id  debounceKey :: GLFW.Key -> GLFWInputState -> GLFWInputState debounceKey key input = input { keysPressed = Map.delete key (keysPressed input) }
netwire-input-glfw.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                netwire-input-glfw-version:             0.0.3+version:             0.0.4 synopsis:            GLFW instance of netwire-input description:         This package contains the necessary glue to allow the use                      of wires from the netwire-input package. In general, the types@@ -14,7 +14,7 @@ license-file:        LICENSE author:              Pavel Krajcevski maintainer:          Krajcevski@gmail.com-copyright:           Pavel Krajcevski, 2014+copyright:           Pavel Krajcevski, 2015 category:            Game build-type:          Simple extra-source-files:  examples/Cursor.hs README.md@@ -35,10 +35,10 @@                        InstanceSigs   exposed-modules:     FRP.Netwire.Input.GLFW   -- other-modules:       -  build-depends:       base >=4.6 && <4.8,+  build-depends:       base >= 4.6 && < 4.10,                        netwire-input,                        containers,-                       GLFW-b,+                       GLFW-b >= 1.4.7.2,                        stm,                        mtl   hs-source-dirs:      lib@@ -61,7 +61,7 @@                     netwire-input,                     netwire-input-glfw,                     OpenGL,-                    GLFW-b,+                    GLFW-b >= 1.4.7.2,                     transformers,                     array,                     bytestring,