diff --git a/src/Dodge/DisplayInventory.hs b/src/Dodge/DisplayInventory.hs index d8c19c6d7..f7f2e565b 100644 --- a/src/Dodge/DisplayInventory.hs +++ b/src/Dodge/DisplayInventory.hs @@ -133,7 +133,7 @@ updateDisplaySections w cfig = , nearbyhead , sclose , interfaceshead - , interfaces + , btitems ] ) where @@ -146,9 +146,10 @@ updateDisplaySections w cfig = (sfclose, sclose) = filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $ w ^? hud . hudElement . diCloseFilter . _Just - nearbyhead = if null sfclose then makehead "NEARBY ITEMS" else sfclose + nearbyhead + | null sfclose && not (null sclose) = makehead "NEARBY ITEMS" + | otherwise = sfclose interfaceshead = if null btitems then mempty else makehead "NEARBY INTERFACES" - interfaces = btitems btitems = IM.fromDistinctAscList . zip [0 ..] $ mapMaybe (closeButtonToSelectionItem w) (w ^. hud . closeButtons) @@ -324,39 +325,7 @@ enterCombineInv cfig w = w & hud . hudElement . subInventory .~ CombineInventory { _ciSections = updateCombineSections w cfig mempty - , _ciSelection = selpos + , _ciSelection = Just (0,0,mempty) , _ciFilter = Nothing } --- .~ CombineInventory --- { _ciSections = IM.fromDistinctAscList [(-1, filtsection), (0, combsection)] --- , _ciSelection = selpos --- , _ciFilter = Nothing --- } - & hud . hudElement . diInvFilter - .~ Nothing - where - cm' = IM.fromDistinctAscList . zip [0 ..] $ combineList w - cm - | null cm' = - IM.singleton 0 $ - SelectionInfo ["No possible combinations"] 1 25 False white 0 - | otherwise = cm' - selpos - | null cm' = Nothing - | otherwise = Just (0, 0, mempty) - filtsection = - SelectionSection - { _ssItems = mempty - , _ssOffset = 0 - , _ssShownItems = mempty - , _ssShownLength = 0 - , _ssIndent = 0 - } - combsection = - updateSection - 0 - (Just 0) - cm - availablelines - 0 - availablelines = getAvailableListLines secondColumnParams cfig + & hud . hudElement . diInvFilter .~ Nothing