15 lines
No EOL
611 B
Haskell
15 lines
No EOL
611 B
Haskell
module RPGEngine.Render.LvlSelect
|
|
( renderLvlList
|
|
) where
|
|
|
|
import Graphics.Gloss ( Picture, pictures, translate, scale )
|
|
import Graphics.Gloss.Data.Picture (blank, text)
|
|
import RPGEngine.Render.Core (resolution, zoom)
|
|
|
|
-- Render all level names, under each other.
|
|
renderLvlList :: [FilePath] -> Picture
|
|
renderLvlList list = pictures $ map render entries
|
|
where entries = zip [0::Int .. ] list
|
|
render (i, path) = scale zoomed zoomed $ translate 0 (offset i) $ text path
|
|
zoomed = 0.1 * zoom
|
|
offset i = negate (2 * resolution * zoom * fromIntegral i) |