Make Nearby Items subheading disappear if none nearby/not filtering

This commit is contained in:
2025-12-24 22:14:13 +00:00
parent 27cb05b8f7
commit b9a6bd5f67
3 changed files with 4 additions and 11 deletions
+4 -1
View File
@@ -125,7 +125,7 @@ updateDisplaySections w cfig =
, sinv
, IM.singleton 0 $
SelItem [displayFreeSlots (crNumFreeSlots (w ^. cWorld . lWorld . items) cr)] 1 15 True invDimColor 2 Nothing NoSIDisplayMod
, sfclose
, sfclose1
, sclose
, interfaceshead
, btitems
@@ -137,6 +137,9 @@ updateDisplaySections w cfig =
filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $
w ^? hud . diInvFilter . _Just
closefiltcurs = mselpos ^? _Just . slSec == Just 2
sfclose1
| null sclose && sfclose ^? ix 0 . siIsSelectable == Just False = mempty
| otherwise = sfclose
(sfclose, sclose) =
filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY ITEMS" $
w ^? hud . diCloseFilter . _Just