Remove SelectionSections

This commit is contained in:
2024-10-25 22:19:04 +01:00
parent a20fc48eaa
commit d93c548d3c
15 changed files with 202 additions and 195 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ import Geometry.Data
data HUDElement
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: SelectionSections ()
, _diSections :: IntMap (SelectionSection ())
, _diSelection :: Maybe (Int, Int)
, _diFilters :: IntMap (Maybe String)
, _diSelectionExtra :: Int
@@ -36,7 +36,7 @@ data SubInventory
}
| ExamineInventory
| CombineInventory
{ _ciSections :: SelectionSections CombinableItem
{ _ciSections :: IntMap (SelectionSection CombinableItem)
, _ciSelection :: Maybe (Int, Int)
, _ciFilters :: IntMap (Maybe String)
}
+4 -13
View File
@@ -33,17 +33,9 @@ data SelectionList a = SelectionList
, _slSelPos :: Maybe Int
}
data SelectionSections a = SelectionSections
{ _sssSections :: IntMap (SelectionSection a)
-- , _sssExtra :: SSSExtra
}
-- note that filters are arbitrary: the sssFilters point to the lower of
-- a pair of ints (i,i+1) such that the lower is the regex section, the higher
-- is the items section.
newtype SSSExtra = SSSExtra
{ _sssFilters :: IntMap (Maybe String)
}
--data SelectionSections a = SelectionSections
-- { _sssSections :: IntMap (SelectionSection a)
-- }
data SectionCursor = SectionCursor
{ _scurPos :: Int
@@ -87,8 +79,7 @@ makeLenses ''ListDisplayParams
makeLenses ''SelectionList
makeLenses ''SelectionItem
makeLenses ''SelectionSection
makeLenses ''SelectionSections
makeLenses ''SSSExtra
--makeLenses ''SelectionSections
makeLenses ''SectionCursor
makeLenses ''CursorDisplay