This repository has been archived on 2023-06-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2022FuncProg-project3-RPGEn.../lib/RPGEngine/Render/Menu.hs

24 lines
No EOL
708 B
Haskell

module RPGEngine.Render.Menu
( renderMenu
) where
import RPGEngine.Render.Core (Renderer, getRender)
import RPGEngine.Config ( uizoom, textColor )
import RPGEngine.Data (State)
import Graphics.Gloss (text, scale, color, translate, pictures)
------------------------------ Constants -----------------------------
message :: String
message = "[Press any key to start]"
------------------------------ Exported ------------------------------
renderMenu :: Renderer State
renderMenu _ = pictures [main, pressAny]
where pressAny = scaled $ center $ color textColor $ text message
scaled = scale uizoom uizoom
center = translate (-800) (-320)
main = getRender "main"