Add modules to items, upgrades the can persist through combinations
This commit is contained in:
@@ -84,6 +84,11 @@ subInventoryDisplay cfig w = case _inventoryMode w of
|
||||
CombineInventory mi -> pictures
|
||||
[ invHead cfig "COMBINE"
|
||||
, listTextPicturesAt subInvX 60 cfig $ combineListStringPictures w
|
||||
, fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
strs <- fmap (snd . snd) (combineItemListYou' w !? i)
|
||||
return $ listTextPicturesAtOffset (subInvX + 150) 60 cfig cpos $ map (color red . text) strs
|
||||
, fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
@@ -290,7 +295,6 @@ itemText it = f $ case _itCurseStatus it of
|
||||
where
|
||||
thecolor = _itInvColor it
|
||||
f = take (itSlotsTaken it) . (++ replicate 10 (color (_itInvColor it) $ text "*"))
|
||||
|
||||
|
||||
openCursorAt
|
||||
:: Float -- ^ Width
|
||||
|
||||
@@ -10,8 +10,10 @@ import Data.Maybe
|
||||
-- given a list of pictures that are each the size of a "text" call, displays them as
|
||||
-- a list on the screen
|
||||
listTextPicturesAt :: Float -> Float -> Configuration -> [Picture] -> Picture
|
||||
listTextPicturesAt tx ty cfig = mconcat . zipWith (listTextPictureAt tx ty cfig) [0..]
|
||||
listTextPicturesAt tx ty cfig = listTextPicturesAtOffset tx ty cfig 0
|
||||
|
||||
listTextPicturesAtOffset :: Float -> Float -> Configuration -> Int -> [Picture] -> Picture
|
||||
listTextPicturesAtOffset tx ty cfig i = mconcat . zipWith (listTextPictureAt tx ty cfig) [i..]
|
||||
|
||||
-- displays a cursor that should match up to list text pictures
|
||||
-- the width of a character appears to be 9(?!)
|
||||
|
||||
Reference in New Issue
Block a user