Start adding filters to selection lists

This commit is contained in:
2023-01-15 11:55:32 +00:00
parent 6f1162f7b9
commit 64b1c2761e
16 changed files with 128 additions and 66 deletions
+6 -2
View File
@@ -4,7 +4,6 @@
{-# LANGUAGE StrictData #-}
module Dodge.Data.SelectionList where
import Color
import Picture.Data
import Control.Lens
import Dodge.Data.CardinalPoint
--import Data.Aeson
@@ -24,6 +23,8 @@ data SelectionList a = SelectionList
{ _slItems :: [SelectionItem a]
, _slSelPos :: Maybe Int
, _slLength :: Int
, _slRegex :: String
, _slRegexInput :: Bool
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
@@ -35,7 +36,7 @@ data CursorType = NoCursor
| BorderCursor [CardinalPoint]
data SelectionItem a = SelectionItem
{ _siPictures :: [Picture]
{ _siPictures :: [String]
, _siHeight :: Int
, _siIsSelectable :: Bool
, _siWidth :: Int
@@ -43,6 +44,9 @@ data SelectionItem a = SelectionItem
, _siOffX :: Int
, _siPayload :: a
}
| SelectionFilter
{ _siPictures :: [String]
}
--deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''ListDisplayParams