From f5325148fab8e6420a7533289bf529f3ec6d5b30 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 4 Mar 2023 08:00:50 +0000 Subject: Show key or button depending on the controls --- data/sprites.png | Bin 16338 -> 16324 bytes src/Game.hs | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/sprites.png b/data/sprites.png index f161ed5..8cf5e98 100644 Binary files a/data/sprites.png and b/data/sprites.png differ diff --git a/src/Game.hs b/src/Game.hs index e93269e..2f9988d 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -218,7 +218,10 @@ gameOverLoop e = do BF.renderText renderer font 109 116 "Press to retry" button <- S.get sprites "ui" - S.render renderer button 143 113 0 1 + let buttonOrKey = case ctl.joyId of + Just _ -> 1 + Nothing -> 2 + S.render renderer button 143 113 0 buttonOrKey BF.renderText renderer font 112 132 "(or ESC to quit)" pure e -- cgit v1.2.3