aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Sunet <jeannekamikaze@gmail.com>2012-08-27 20:10:06 +0200
committerMarc Sunet <jeannekamikaze@gmail.com>2012-08-27 20:10:06 +0200
commitc5b7ec13df9787441b635c80c4edabc8ad23fc36 (patch)
treeca3ba66db5c1bebd524a34f446054eaa1c42ba64
parent387709271b6eaaec76c79143838a25432cc3ba64 (diff)
Added newDMS
-rw-r--r--Spear/App/Input.hs5
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)
25where 26where
@@ -170,6 +171,10 @@ type ButtonDelay = MouseButton -> Float
170newtype DelayedMouseState = DelayedMouseState (V.Vector Float) 171newtype DelayedMouseState = DelayedMouseState (V.Vector Float)
171 172
172 173
174newDMS :: DelayedMouseState
175newDMS = DelayedMouseState $ V.replicate (fromEnum (maxBound :: MouseButton)) 0
176
177
173delayedMouse :: ButtonDelay -- ^ Delay configuration for each button. 178delayedMouse :: 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.