Add hacky block shadow to inventory items

This commit is contained in:
2025-12-26 10:41:21 +00:00
parent b9a6bd5f67
commit 2cb9fb153a
5 changed files with 188 additions and 181 deletions
+6
View File
@@ -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 #-}