Add hacky block shadow to inventory items
This commit is contained in:
@@ -26,6 +26,7 @@ module Picture.Base (
|
||||
lineCol,
|
||||
text,
|
||||
hackBoldText,
|
||||
hackDropShadow,
|
||||
textRight,
|
||||
textJustifyLeft,
|
||||
textJustifyRight,
|
||||
@@ -198,6 +199,11 @@ text = drawText 0
|
||||
hackBoldText :: String -> Picture
|
||||
hackBoldText s = text s <> translate 10 0 (text s)
|
||||
|
||||
hackDropShadow :: Color -> Color -> String -> Picture
|
||||
hackDropShadow c1 c2 s = color c2 (translate 10 (-10) (text s))
|
||||
-- <> color c2 (translate (-10) 10 (text s))
|
||||
<> color c1 (text s)
|
||||
|
||||
-- lines up the rightmost part of the last character with 0
|
||||
textJustifyRight :: String -> Picture
|
||||
{-# INLINE textJustifyRight #-}
|
||||
|
||||
Reference in New Issue
Block a user