This commit is contained in:
Nicole Dresselhaus 2014-08-29 21:25:31 +02:00
parent c10622d506
commit 0e13d1c5ba
No known key found for this signature in database
GPG Key ID: BC16D887851A1A80
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ module Render.Misc where
import Control.Monad
import qualified Data.ByteString as B (ByteString)
import Data.Int (Int8)
import Data.Word (Word32)
import Data.Word (Word32,Word8)
import Graphics.Rendering.OpenGL.GL.Shaders
import Graphics.Rendering.OpenGL.GL.StateVar
import Graphics.Rendering.OpenGL.GL.StringQueries
@ -160,8 +160,8 @@ tryWithTexture t f fail' =
_ -> fail'
genColorData :: Int -- ^ Amount
-> [Int8] -- ^ [r,g,b,a], [r,g,b] - whatever should be repeatet.
-> [Int8]
-> [Word8] -- ^ [r,g,b,a], [r,g,b] - whatever should be repeatet.
-> [Word8]
genColorData n c = take (length c*n) (cycle c)
chunksOf :: Int -> [a] -> [[a]]

View File

@ -117,7 +117,7 @@ eventCallback e = do
case state of
SDL.Pressed -> maybe (return ()) (`mousePressHandler` (x, y)) $ transformButton button
SDL.Released -> maybe (return ()) (`mouseReleaseHandler` (x, y)) $ transformButton button
_ -> return ()
--_ -> return () -- causes "pattern match overlapped"
SDL.MouseWheel _ _ _ vscroll -> -- windowID mouseID hScroll vScroll
do -- TODO: MouseWheelHandler
state <- get