Cleanup
This commit is contained in:
@@ -3,6 +3,8 @@ module Dodge.Render.HUD (
|
||||
drawHUD,
|
||||
) where
|
||||
|
||||
import SelectionIntMap
|
||||
import Dodge.Data.Combine
|
||||
import Dodge.Default.SelectionList
|
||||
import Dodge.Combine
|
||||
import Dodge.Creature.Info
|
||||
@@ -90,7 +92,7 @@ drawSubInventory subinv cfig w = case subinv of
|
||||
cfig
|
||||
("COMBINE")
|
||||
sl
|
||||
<> combineInventoryExtra mi cfig w
|
||||
<> combineInventoryExtra sl mi cfig w
|
||||
|
||||
titledSub :: Configuration -> String -> SelectionList a -> Picture
|
||||
titledSub cfig subtitle subitems =
|
||||
@@ -180,20 +182,20 @@ examineInventoryExtra mtweaki mitm cfig =
|
||||
-- , drawSelectionList thirdColumnParams cfig (thirdColumnPara (itmInfo mitm))
|
||||
]
|
||||
|
||||
combineInventoryExtra :: Maybe Int -> Configuration -> World -> Picture
|
||||
combineInventoryExtra mi cfig w =
|
||||
combineInventoryExtra :: SelectionIntMap CombinableItem -> Maybe Int -> Configuration -> World -> Picture
|
||||
combineInventoryExtra sm mi cfig w =
|
||||
pictures
|
||||
[ fromMaybe mempty $ do
|
||||
i <- mi
|
||||
cpos <- combinePoss w !? i
|
||||
col <- (combineItemListYou w !? i) <&> _itInvColor . snd
|
||||
let cpos = getIthPos i (sm ^. smShownItems)
|
||||
col <- sm ^? smShownItems . ix i . siColor
|
||||
return $
|
||||
pictures
|
||||
[ fromMaybe mempty $ do
|
||||
strs <- fmap (fst . snd) (combineListInfo w !? i)
|
||||
strs <- sm ^? smShownItems . ix i . siPayload . ciInfo
|
||||
return $ listPicturesAtOff (subInvX + 150) 60 cfig cpos $ map (color red . text) strs
|
||||
, fromMaybe mempty $ do
|
||||
lnks <- map fst (combineItemListYou w) !? i
|
||||
lnks <- sm ^? smShownItems . ix i . siPayload . ciInvIDs
|
||||
return $
|
||||
lnkMidPosInvSelsCol cfig w cpos col lnks
|
||||
<> foldMap (topCursorTypeWidth listCursorNESW (topInvW + 2) cfig w) lnks
|
||||
|
||||
Reference in New Issue
Block a user