Move combine list over to SelectionSections -- more todo

This commit is contained in:
2023-02-18 10:59:59 +00:00
parent 36b9b5445c
commit 6eca3bab38
10 changed files with 119 additions and 160 deletions
+6 -2
View File
@@ -1,7 +1,11 @@
{-# LANGUAGE TupleSections #-}
module Dodge.DisplayInventory
( updateDisplayInventory
, defaultSS
, defaultFiltSection
, defaultDisplaySections
, updateSections
, updateSection
) where
import Regex
@@ -96,7 +100,7 @@ updateSections allavailablelines (i,j) ((k,(x,y)):xs) = IM.insert k ss
| otherwise = updateSection Nothing y availablelines x
availablelines = allavailablelines - sum (map (_ssMinSize . fst . snd) xs)
defaultSS :: SelectionSection ()
defaultSS :: SelectionSection a
defaultSS = SelectionSection
{ _ssItems = mempty
, _ssCursor = Nothing
@@ -113,7 +117,7 @@ defaultCOSection = defaultSS
& ssIndent .~ 2
& ssDescriptor .~ "CLOSE OBJECTS"
defaultFiltSection :: SelectionSection ()
defaultFiltSection :: SelectionSection a
defaultFiltSection = defaultSS
& ssIndent .~ 0
& ssDescriptor .~ "INV"