Closes #7
This commit is contained in:
parent
1dc8aac4c7
commit
becd305e01
2 changed files with 12 additions and 6 deletions
|
@ -17,13 +17,17 @@ winOffsets = (0, 0)
|
|||
|
||||
-- Game background color
|
||||
bgColor :: Color
|
||||
bgColor = white
|
||||
bgColor = makeColor (37 / 256) (19 / 256) (26 / 256) 1
|
||||
|
||||
-- Text color
|
||||
textColor :: Color
|
||||
textColor = white
|
||||
|
||||
-- Default scale
|
||||
zoom :: Float
|
||||
zoom = 5.0
|
||||
zoom = 5
|
||||
|
||||
-- UI scale
|
||||
-- UI scale, number between 0 (small) and 1 (big)
|
||||
uizoom :: Float
|
||||
uizoom = 0.5
|
||||
|
||||
|
|
|
@ -4,12 +4,14 @@ module RPGEngine.Render.Menu
|
|||
|
||||
import RPGEngine.Render.Core (Renderer)
|
||||
|
||||
import RPGEngine.Config ( uizoom, textColor )
|
||||
import RPGEngine.Data (State)
|
||||
|
||||
import Graphics.Gloss (text)
|
||||
import Graphics.Gloss (text, scale, color, white, translate)
|
||||
|
||||
------------------------------ Exported ------------------------------
|
||||
|
||||
-- TODO
|
||||
renderMenu :: Renderer State
|
||||
renderMenu _ = text "[Press any key to start]"
|
||||
renderMenu _ = scaled $ center $ color textColor $ text "[Press any key to start]"
|
||||
where scaled = scale uizoom uizoom
|
||||
center = translate (-750) 0
|
Reference in a new issue