Allow for events to do io
This commit is contained in:
@@ -9,20 +9,19 @@ import Dodge.Base.Window
|
||||
import Dodge.WinScale
|
||||
import Picture
|
||||
|
||||
renderListAt :: Float -> Float -> Configuration -> World -> [(String,Color)] -> Picture
|
||||
renderListAt tx ty cfig w =
|
||||
concatMapPic (winScale cfig) . zipWith (listPairAt tx ty cfig w) [0..]
|
||||
renderListAt :: Float -> Float -> Configuration -> [(String,Color)] -> Picture
|
||||
renderListAt tx ty cfig =
|
||||
concatMapPic (winScale cfig) . zipWith (listPairAt tx ty cfig) [0..]
|
||||
|
||||
listPairAt
|
||||
:: Float -- ^ x offset
|
||||
-> Float -- ^ y offset
|
||||
-> Configuration
|
||||
-> World
|
||||
-> Int -- ^ y offset (discrete)
|
||||
-> (String,Color) -- ^ The text item
|
||||
-> Picture
|
||||
{-# INLINE listPairAt #-}
|
||||
listPairAt xoff yoff cfig w yint (s,col)
|
||||
listPairAt xoff yoff cfig yint (s,col)
|
||||
= translate (xoff + 15 - halfWidth cfig) (yoff + halfHeight cfig - (20 * (fromIntegral yint+1)))
|
||||
. scale 0.1 0.1
|
||||
. dShadCol col
|
||||
|
||||
Reference in New Issue
Block a user