Jumpbacks and continue

This commit is contained in:
Tibo De Peuter 2022-12-22 09:43:17 +01:00
parent dab6fadad4
commit b7278d6afc
11 changed files with 59 additions and 44 deletions

View file

@ -4,7 +4,7 @@ module RPGEngine.Render.Paused
import RPGEngine.Render.Core ( Renderer, overlay )
import RPGEngine.Data ( Game )
import RPGEngine.Data ( State (..) )
import Graphics.Gloss ( pictures, scale, text )
import RPGEngine.Render.Playing ( renderPlaying )
import Graphics.Gloss.Data.Picture (color)
@ -12,9 +12,10 @@ import Graphics.Gloss.Data.Color (white)
------------------------------ Exported ------------------------------
renderPaused :: Renderer Game
renderPaused g = pictures [renderPlaying g, pause]
where pause = pictures [
renderPaused :: Renderer State
renderPaused state = pictures [playing, pause]
where playing = renderPlaying $ continue state
pause = pictures [
overlay,
color white $ scale 0.5 0.5 $ text "[Press any key to continue]"
]