Allow for custom reloading sounds
This commit is contained in:
+13
-1
@@ -49,7 +49,7 @@ inventoryDisplay cfig w = listPicturesAt 0 0 cfig invlist
|
||||
where
|
||||
cr = you w
|
||||
inv = _crInv cr
|
||||
invlist = concatMap itemText (IM.elems inv)
|
||||
invlist = concatMap (itemText' cr) (IM.toList inv)
|
||||
++ displayFreeSlots
|
||||
++ concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w)
|
||||
-- ++ map floorItemsColor (concatMap (closeObjectToTextPictures nfreeslots) (_closeObjects w))
|
||||
@@ -367,6 +367,18 @@ mapWall cfig w wl =
|
||||
mainListCursor :: Color -> Int -> Configuration -> Picture
|
||||
mainListCursor c = openCursorAt 120 c 5 0
|
||||
|
||||
itemText' :: Creature -> (Int,Item) -> [Picture]
|
||||
{-# INLINE itemText' #-}
|
||||
itemText' cr (i,it) = f $ case _itCurseStatus it of
|
||||
UndroppableIdentified -> map (color yellow . text) (itemDisplay it)
|
||||
_ | crSel cr == i -> map (color thecolor . text) (selectedItemDisplay cr it)
|
||||
_ -> map (color thecolor . text) (itemDisplay it)
|
||||
where
|
||||
thecolor = _itInvColor it
|
||||
f = take (itSlotsTaken it) . (++ replicate 10 (color (_itInvColor it) $ text "*"))
|
||||
|
||||
|
||||
|
||||
itemText :: Item -> [Picture]
|
||||
{-# INLINE itemText #-}
|
||||
itemText it = f $ case _itCurseStatus it of
|
||||
|
||||
Reference in New Issue
Block a user