Partial fix of inventory rendering

This commit is contained in:
2021-07-23 12:48:40 +02:00
parent b4d89b16fa
commit e453065afe
7 changed files with 79 additions and 14 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ winScale :: World -> Picture -> Picture
winScale w = scale (2 / getWindowX w) (2 / getWindowY w)
hudDrawings :: World -> Picture
hudDrawings w = setLayer 1 . setDepth (-0.5) . pictures $
hudDrawings w = pictures $
[ winScale w . dShadCol white $ displayHP 0 w
, winScale w . translate (-390) 20 . scale 0.05 0.05 . dShadCol white $ text (_testString w)
]
@@ -221,8 +221,8 @@ closeObjectTexts w = pictures $ zipWith renderList [(0::Int)..] (map colAndText
{- | Colour picture and add black drop shadow. -}
dShadCol :: Color -> Picture -> Picture
dShadCol c p = pictures
[ color black $ uncurry translate (1.2,-1.2) p
, color c p
[ color c p
, color black $ uncurry translate (1.2,-1.2) p
]
drawListCursor :: Color -> Int -> World -> Picture
+2 -2
View File
@@ -46,9 +46,9 @@ fixedCoordPictures w = case _menuLayers w of
customMouseCursor :: World -> Picture
customMouseCursor w =
setDepth (-1)
. scale (2 /getWindowX w) (2/ getWindowY w)
scale (2 /getWindowX w) (2/ getWindowY w)
. uncurry translate (_mousePos w)
. color white
$ pictures [ line [(-5,0),(5,0)] , line [(0,-5),(0,5)] ]
testPic :: World -> [Picture]