Tweak combine inventory regex

This commit is contained in:
2023-02-13 21:18:11 +00:00
parent b5db7a3420
commit 8b39a99194
12 changed files with 78 additions and 88 deletions
+15 -2
View File
@@ -30,6 +30,12 @@ data SelectionList a = SelectionList
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Regex = NoRegex
| Regex
{ _regString :: String
, _regInput :: Bool
}
data SelectionSections a = SelectionSections
{ _sssSections :: IntMap (SelectionSection a)
, _sssSelPos :: Maybe Int
@@ -55,12 +61,17 @@ data SelectionSection a = SelectionSection
, _ssDescriptor :: String
}
data SMRegex = NoSMRegex
| SMRegex
{ _smrString :: String
, _smrInput :: Bool
}
deriving (Show)
data SelectionIntMap a = SelectionIntMap
{ _smItems :: [SelectionItem a]
, _smSelPos :: Maybe Int
, _smRegex :: String
, _smRegexInput :: Bool
, _smRegex :: SMRegex
, _smShownItems :: IntMap (SelectionItem a)
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
@@ -98,5 +109,7 @@ makeLenses ''SelectionIntMap
makeLenses ''SelectionSection
makeLenses ''SelectionSections
makeLenses ''SectionCursor
makeLenses ''Regex
makeLenses ''SMRegex
--deriveJSON defaultOptions ''SelectionItem
--deriveJSON defaultOptions ''SelectionList
-7
View File
@@ -68,13 +68,6 @@ data ScreenLayer
{ _scInput :: String
, _scFooter :: String
}
-- | WaitScreen
-- { _scWaitMessage :: Universe -> String
-- , _scWaitTime :: Int
-- }
-- | DisplayScreen
-- { _scDisplay :: Universe -> Picture
-- }
data MenuOptionDisplay
= MODString {_modString :: String}