Work on a selection list datatype
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user