Add "equipped" text

This commit is contained in:
2022-02-17 20:35:34 +00:00
parent f4d88a15bf
commit c0dcb4a5ec
2 changed files with 12 additions and 6 deletions
+4 -6
View File
@@ -48,7 +48,7 @@ inventoryDisplay cfig w = listTextPicturesAt 0 0 cfig invlist
cr = you w
inv = _crInv cr
invlist = concatMap itemText (IM.elems inv)
++ displayFreeSlots
++ displayFreeSlots
++ map floorItemsColor (concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w))
floorItemsColor
| _inventoryMode w == TopInventory = id
@@ -60,11 +60,9 @@ inventoryDisplay cfig w = listTextPicturesAt 0 0 cfig invlist
x -> [color invDimColor . text $ " +" ++ show x ++ " FREE SLOTS"]
equipcursor = case _crLeftInvSel cr of
Nothing -> mempty
Just invid -> listCursorNES 0 0 cfig (selNumPos invid w) yellow topInvW
(selNumSlots invid w)
equipcursors = foldMap f (IS.toList $ _crInvEquipped cr)
where
f ei = listCursorNES 5 5 cfig (selNumPos ei w) blue topInvW (selNumSlots ei w)
Just invid -> f cyan invid
equipcursors = foldMap (f yellow) (IS.toList $ _crInvEquipped cr)
f col invid = listTextPictureAt 144 0 cfig (selNumPos invid w) . color col $ text "EQUIPPED"
subInventoryDisplay :: Configuration -> World -> Picture