Add shrinkability and cursed items

This commit is contained in:
2021-11-18 18:30:22 +00:00
parent 147d6098ab
commit a546d070f0
82 changed files with 273 additions and 233 deletions
+8 -1
View File
@@ -37,6 +37,7 @@ drawInventory w = subInventoryDisplay w `appendPic` displayInv 0 w
subInventoryDisplay :: World -> Picture
subInventoryDisplay w = case _inventoryMode w of
LockedInventory -> topInvCursor col iPos w
TopInventory -> pictures
[ closeObjectTexts w
, topInvCursor col iPos w
@@ -201,7 +202,13 @@ itemText :: Item -> Picture
--itemText NoItem = dShadCol (greyN 0.5) $ text "----"
--itemText it = dShadCol (_itInvColor it) $ text (_itInvDisplay it it)
itemText NoItem = text "----"
itemText it = color (_itInvColor it) $ text (_itInvDisplay it it)
itemText it = case _itCurseStatus it of
UndroppableIdentified -> color black (text (_itInvDisplay it it))
<> color (withAlpha 0.5 thecolor) (polygon (rectNSEW 120 (-70) 900 (-100)))
_ -> color thecolor $ text (_itInvDisplay it it)
where
thecolor = _itInvColor it
openCursorAt
:: Float -- ^ Width