From 838a460c1be7260986d272306ce92776e0b489db Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 25 Feb 2023 15:58:30 +0000 Subject: Keep the hud in the game over screen --- src/Game.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Game.hs b/src/Game.hs index 4f84ad1..0b72f3c 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -210,12 +210,14 @@ gameLoop = do SDL.rendererDrawBlendMode renderer $= SDL.BlendAlphaBlend SDL.rendererDrawColor renderer $= V4 0 0 0 (fromIntegral (255 - i * (255 `div` gameOverDelay))) - SDL.fillRect renderer Nothing + SDL.fillRect renderer (Just $ U.rect 0 0 320 176) gameOverLoop :: Env -> IO () gameOverLoop env = do let renderer = env.renderer sprites = env.sprites + hud = env.hud + H.render renderer hud title <- S.get sprites "game-over" S.render renderer title 112 80 0 0 -- cgit v1.2.3