Refactor menu

This commit is contained in:
jgk
2021-04-08 00:44:02 +02:00
parent 294f2509d0
commit ddb1171e2e
9 changed files with 73 additions and 49 deletions
+4 -2
View File
@@ -16,16 +16,18 @@ menuScreen w = case _menuState w of
,controlsList
]
PauseMenu -> pictures
[--color (withAlpha 0.5 black) $ polygon $ screenBox w
tst (-100) 100 0.4 "PAUSED"
[color (withAlpha 0.5 black) $ polygon $ screenBox w
,tst (-100) 100 0.4 "PAUSED"
,tst (-100) 50 0.2 "n - new level"
,tst (-100) 0 0.2 "r - restart"
,tst (-100) (-50) 0.2 "o - options"
, controlsList
]
GameOverMenu -> pictures [color (withAlpha 0.5 black) $ polygon $ screenBox w
,tst (-100) 100 0.4 "GAME OVER"
,tst (-100) 50 0.2 "n - new level"
,tst (-100) 0 0.2 "r - restart"
,tst (-100) (-50) 0.2 "o - options"
,controlsList
]
where tst x y sc t = translate x y $ scale sc sc $ color white $ text t