diff options
-rw-r--r-- | Spear/App/Input.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Spear/App/Input.hs b/Spear/App/Input.hs index ef678d6..07e7189 100644 --- a/Spear/App/Input.hs +++ b/Spear/App/Input.hs | |||
@@ -20,6 +20,7 @@ module Spear.App.Input | |||
20 | , toggledMouse | 20 | , toggledMouse |
21 | , toggledKeyboard | 21 | , toggledKeyboard |
22 | -- * Delayed input | 22 | -- * Delayed input |
23 | , newDMS | ||
23 | , delayedMouse | 24 | , delayedMouse |
24 | ) | 25 | ) |
25 | where | 26 | where |
@@ -170,6 +171,10 @@ type ButtonDelay = MouseButton -> Float | |||
170 | newtype DelayedMouseState = DelayedMouseState (V.Vector Float) | 171 | newtype DelayedMouseState = DelayedMouseState (V.Vector Float) |
171 | 172 | ||
172 | 173 | ||
174 | newDMS :: DelayedMouseState | ||
175 | newDMS = DelayedMouseState $ V.replicate (fromEnum (maxBound :: MouseButton)) 0 | ||
176 | |||
177 | |||
173 | delayedMouse :: ButtonDelay -- ^ Delay configuration for each button. | 178 | delayedMouse :: ButtonDelay -- ^ Delay configuration for each button. |
174 | -> Mouse -- ^ Current mouse state. | 179 | -> Mouse -- ^ Current mouse state. |
175 | -> Float -- ^ Time elapsed since last udpate. | 180 | -> Float -- ^ Time elapsed since last udpate. |