Fix some menu bugs

This commit is contained in:
2021-05-01 19:31:10 +02:00
parent 6eb6221a84
commit 9cdd3a9629
4 changed files with 61 additions and 48 deletions
+6 -5
View File
@@ -28,11 +28,12 @@ worldPictures w = pictures $ concat
]
fixedCoordPictures :: World -> Picture
fixedCoordPictures w = pictures
[ hudDrawings w
, scaler . onLayer MenuDepth $ menuScreen (_config w) (halfWidth w) (halfHeight w) (_menuLayers w)
, customMouseCursor w
]
fixedCoordPictures w = case _menuLayers w of
[] -> pictures
[ hudDrawings w
, customMouseCursor w
]
lays -> scaler . onLayer MenuDepth $ menuScreen (_config w) (halfWidth w) (halfHeight w) lays
where
scaler = setDepth (-1) . scale (2 / getWindowX w) (2 / getWindowY w)