Commit before trying to generalise filterable sections
This commit is contained in:
@@ -30,6 +30,14 @@ data SelectionList a = SelectionList
|
|||||||
}
|
}
|
||||||
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||||
|
|
||||||
|
-- this is projected to be VERY arbitrary: the fssFilters 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.
|
||||||
|
data FilterableSections a = FilterableSections
|
||||||
|
{ _fssFilters :: IntMap (Maybe String)
|
||||||
|
, _fssSections :: SelectionSections a
|
||||||
|
}
|
||||||
|
|
||||||
data SelectionSections a = SelectionSections
|
data SelectionSections a = SelectionSections
|
||||||
{ _sssSections :: IntMap (SelectionSection a)
|
{ _sssSections :: IntMap (SelectionSection a)
|
||||||
, _sssSelPos :: Maybe (Int,Int)
|
, _sssSelPos :: Maybe (Int,Int)
|
||||||
@@ -88,6 +96,7 @@ makeLenses ''SelectionList
|
|||||||
makeLenses ''SelectionItem
|
makeLenses ''SelectionItem
|
||||||
makeLenses ''SelectionSection
|
makeLenses ''SelectionSection
|
||||||
makeLenses ''SelectionSections
|
makeLenses ''SelectionSections
|
||||||
|
makeLenses ''FilterableSections
|
||||||
makeLenses ''SectionCursor
|
makeLenses ''SectionCursor
|
||||||
--deriveJSON defaultOptions ''SelectionItem
|
--deriveJSON defaultOptions ''SelectionItem
|
||||||
--deriveJSON defaultOptions ''SelectionList
|
--deriveJSON defaultOptions ''SelectionList
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ defaultHUD =
|
|||||||
|
|
||||||
defaultDisplayInventory :: HUDElement
|
defaultDisplayInventory :: HUDElement
|
||||||
defaultDisplayInventory = DisplayInventory
|
defaultDisplayInventory = DisplayInventory
|
||||||
{_subInventory =NoSubInventory
|
{_subInventory = NoSubInventory
|
||||||
, _diSections = defaultInvSections
|
, _diSections = defaultInvSections
|
||||||
, _invRegex = Nothing
|
, _invRegex = Nothing
|
||||||
, _closeRegex = Nothing
|
, _closeRegex = Nothing
|
||||||
|
|||||||
Reference in New Issue
Block a user