From cd8e459100ad72ed9922768c09597245f379368c Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Fri, 17 Jan 2014 07:03:23 -0500 Subject: backspace = all keys off --- axis.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'axis.hs') diff --git a/axis.hs b/axis.hs index 8f2f3ce..05e9060 100644 --- a/axis.hs +++ b/axis.hs @@ -103,9 +103,9 @@ main = let (axis_key_size, axis_key_locations) = getKeyLocations videoClipRect - let allPitches = [_AXIS_BOTTOM_PITCH .. _AXIS_TOP_PITCH] ---drawKeys allPitches videoSurface font blue axis_key_locations axis_key_size - eraseKeys allPitches videoSurface font axis_key_locations axis_key_size + let _ALL_PITCHES = [_AXIS_BOTTOM_PITCH .. _AXIS_TOP_PITCH] + let allKeysOFF = eraseKeys _ALL_PITCHES videoSurface font axis_key_locations axis_key_size + allKeysOFF putStrLn "Initialized." @@ -134,6 +134,8 @@ main = -- textBand videoSurface videoClipRect (SDL.Rect 0 70 0 70) font chord return () + Control.Monad.when (keysDown' /= keysDown && keyDown SDL.SDLK_BACKSPACE keysDown') allKeysOFF + -- Control.Monad.when (keysDown' /= keysDown) $ do -- let chord = unwords $ map (\k -> drop 5 (show k)) $ Set.toList keysDown' -- textBand videoSurface videoClipRect (SDL.Rect 0 210 0 70) font chord -- cgit v1.2.3