Work on collapsing close item list

This commit is contained in:
2023-02-11 09:09:23 +00:00
parent a8e00ac025
commit 10f732d489
6 changed files with 183 additions and 63 deletions
+3 -3
View File
@@ -84,7 +84,7 @@ inventoryDisplay sss w cfig = listPicturesAtScaleOff
where
thecolor = fromMaybe white $ do
spos <- _sssSelPos sss
sss ^? sssSections . ix spos . ssSelColor . _Just
sss ^? sssSections . ix spos . ssCursor . _Just . scurColor
thecursor = fromMaybe mempty $ do
sectype <- you w ^? crInvSel . isel
let secnum = case sectype of
@@ -94,8 +94,8 @@ inventoryDisplay sss w cfig = listPicturesAtScaleOff
xint <- sss ^? sssSections . ix secnum . ssIndent
spos <- _sssSelPos sss
let y = sum . fmap (length . _ssShownItems) . fst . IM.split spos $ _sssSections sss
yint <- sss ^? sssSections . ix spos . ssSelPos . _Just
csize <- sss ^? sssSections . ix spos . ssSelSize . _Just
yint <- sss ^? sssSections . ix spos . ssCursor . _Just . scurPos
csize <- sss ^? sssSections . ix spos . ssCursor . _Just . scurSize
return $ listCursorDisplayParams ldps [North,South,West] cfig (yint + y) xint white 15 csize
ldps = invDisplayParams w
pics = foldMap (_ssShownItems) (_sssSections sss)