Work on a selection list datatype

This commit is contained in:
2022-11-02 21:47:15 +00:00
parent 7c8958cea7
commit 0872a2dd40
4 changed files with 139 additions and 65 deletions
+10
View File
@@ -1,5 +1,6 @@
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.SelectionList where
import Color
import Picture.Data
import Control.Lens
@@ -12,14 +13,23 @@ data SelectionList = SelectionList
, _slItems :: [SelectionItem]
, _slSelPos :: Maybe Int
, _slCursorType :: CursorType
, _slWidth :: SelectionWidth
}
data SelectionWidth = FixedSelectionWidth Int
| VariableSelectionWidth [Int]
data CursorType = NoCursor
| NSEWCursor
| NSWCursor
| NSCursor
data SelectionItem = SelectionItem
{ _siPictures :: [Picture]
, _siHeight :: Int
, _siIsSelectable :: Bool
, _siColor :: Color
, _siOffX :: Int
}
makeLenses ''SelectionList