Partial fix of inventory rendering
This commit is contained in:
+4
-2
@@ -79,6 +79,7 @@ doDrawing pdata w = do
|
||||
then renderTextureWalls pdata nWalls
|
||||
else renderBlankWalls pdata nWalls
|
||||
--_ <- renderFoldable pdata $ (picToAlt (Just 0) (polysToPic $ foregroundPics w) :: [RenderType])
|
||||
--_ <- renderFoldable pdata $ (picToAlt (Just 0) pic :: [RenderType])
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 0) (polysToPic $ foregroundPics w)
|
||||
_ <- renderFoldable pdata $ picToLTree (Just 0) pic
|
||||
_ <- renderShader (_textureArrayShader pdata) (_floorTiles w)
|
||||
@@ -162,11 +163,12 @@ doDrawing pdata w = do
|
||||
activeTexture $= TextureUnit 0
|
||||
-- draw overlay
|
||||
bufferUBO $ isoMatrix 0 1 (0,0) (2,2)
|
||||
--depthFunc $= Just Always
|
||||
depthMask $= Enabled
|
||||
depthFunc $= Just Always
|
||||
depthMask $= Disabled
|
||||
blend $= Enabled
|
||||
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
|
||||
_ <- renderFoldable pdata (picToLTree Nothing $ fixedCoordPictures w)
|
||||
depthMask $= Enabled
|
||||
|
||||
eTicks <- SDL.ticks
|
||||
return (eTicks - sTicks)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user