Move menu layers outside of world

This commit is contained in:
2021-11-28 14:26:15 +00:00
parent 574f195b21
commit 462100703c
13 changed files with 132 additions and 124 deletions
+4 -4
View File
@@ -10,15 +10,15 @@ import Dodge.Render.MenuScreen
import Geometry
import Picture
fixedCoordPictures :: World -> Picture
fixedCoordPictures :: Universe -> Picture
fixedCoordPictures w = case _menuLayers w of
[] -> pictures
[ hudDrawings w
, customMouseCursor w
[ hudDrawings (_uvWorld w)
, customMouseCursor (_uvWorld w)
]
(lay:_) -> scaler . onLayer MenuDepth $ menuScreen w lay
where
scaler = setDepth (-1) . scale (2 / getWindowX w) (2 / getWindowY w)
scaler = setDepth (-1) . scale (2 / getWindowX (_uvWorld w)) (2 / getWindowY (_uvWorld w))
customMouseCursor :: World -> Picture
customMouseCursor w =