Slightly rethink display of inventories and terminals
This commit is contained in:
@@ -61,13 +61,13 @@ updateCombineSections w cfig =
|
||||
filtcurs
|
||||
(flip . andOrRegex $ regexCombs invitms)
|
||||
(IM.fromDistinctAscList . zip [0 ..] $ combineList w)
|
||||
"COMBINATIONS"
|
||||
"POSSIBLE COMBINATIONS"
|
||||
$ w ^? hud . subInventory . ciFilter . _Just
|
||||
invitms = _unNIntMap $ fmap (\k -> w ^?! cWorld . lWorld . items . ix k) $ fold $ w ^? cWorld . lWorld . creatures . ix 0 . crInv
|
||||
sclose'
|
||||
| null sclose =
|
||||
IM.singleton 0 $
|
||||
SelItem ["No possible combinations"] 1 25 False white 0 Nothing
|
||||
SelItem ["NONE"] 1 25 False white 0 Nothing
|
||||
| otherwise = sclose
|
||||
|
||||
regexCombs :: IM.IntMap Item -> SelectionItem CombinableItem -> String -> Bool
|
||||
@@ -169,24 +169,34 @@ filterSectionsPair ::
|
||||
String ->
|
||||
Maybe String ->
|
||||
(IM.IntMap (SelectionItem a), IM.IntMap (SelectionItem a))
|
||||
filterSectionsPair infocus filtfn itms filtdescription mfilt = (filtsis, itms')
|
||||
filterSectionsPair infocus filtfn itms s mfilt = (x, itms')
|
||||
where
|
||||
filtcurs = if infocus then cFilledRect else cWireRect
|
||||
filtsis = fold $ do
|
||||
x = IM.singleton 0 $ fromMaybe (SelItem [s] 1 (length s) False white 0 Nothing) $ do
|
||||
str <- mfilt
|
||||
return $
|
||||
IM.singleton
|
||||
0
|
||||
$ SelItem
|
||||
[filtdescription ++ " FILTER/" ++ str ++ [filtcurs], numfiltitems]
|
||||
return $ SelItem
|
||||
[s ++ " FILTER/" ++ str ++ [filtcurs], numfiltitems]
|
||||
2
|
||||
(length (filtdescription ++ " FILTER/" ++ str ++ [filtcurs]))
|
||||
(length (s ++ " FILTER/" ++ str ++ [filtcurs]))
|
||||
True
|
||||
white
|
||||
0
|
||||
Nothing
|
||||
-- filtsis = fold $ do
|
||||
-- str <- mfilt
|
||||
-- return $
|
||||
-- IM.singleton
|
||||
-- 0
|
||||
-- $ SelItem
|
||||
-- [filtdescription ++ " FILTER/" ++ str ++ [filtcurs], numfiltitems]
|
||||
-- 2
|
||||
-- (length (filtdescription ++ " FILTER/" ++ str ++ [filtcurs]))
|
||||
-- True
|
||||
-- white
|
||||
-- 0
|
||||
-- Nothing
|
||||
itms' = maybe id (IM.filter . filtfn) mfilt itms
|
||||
numfiltitems = " " ++ show (length itms - length itms') ++ " FILTERED"
|
||||
numfiltitems = show (length itms - length itms') ++ " FILTERED"
|
||||
|
||||
invDimColor :: Color
|
||||
invDimColor = greyN 0.7
|
||||
|
||||
Reference in New Issue
Block a user