Add shrinkability and cursed items
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user