Add layered drawing of pictures

This commit is contained in:
2021-02-24 03:35:42 +01:00
parent a853c2d946
commit 2afe40594e
4 changed files with 150 additions and 92 deletions
+5 -4
View File
@@ -151,8 +151,10 @@ hudDrawings w = (onLayer InvLayer)
$ pictures
[ displayInv 0 w
, dShadCol white $ displayHP 0 w
, dShadCol (itCol (yourItem w))
$ drawCursor w, translate (-390) 20
, --color (itCol (yourItem w))
color white
$ drawCursor w
, translate (-390) 20
$ scale 0.05 0.05 $ dShadCol white $ text (_testString w)
]
where itCol = fromMaybe (greyN 0.5) . (^? itInvColor)
@@ -171,8 +173,7 @@ drawCursor :: World -> Picture
drawCursor w = translate (105-halfWidth w)
(halfHeight w - (25* (fromIntegral iPos)) - 20
)
-- $ rectangleWire 200 25
$ color white
$ setLayer 2
$ line [(200,12.5),(-100,12.5),(-100,-12.5),(200,-12.5)]
where iPos = _crInvSel $ _creatures w IM.! _yourID w