37 lines
810 B
Haskell
37 lines
810 B
Haskell
{-# LANGUAGE TemplateHaskell #-}
|
|
module Dodge.Data.SelectionList where
|
|
import Color
|
|
import Picture.Data
|
|
import Control.Lens
|
|
|
|
data SelectionList = SelectionList
|
|
{ _slPosX :: Float
|
|
, _slPosY :: Float
|
|
, _slOffset :: Int
|
|
, _slScale :: Float
|
|
, _slVerticalGap :: Float
|
|
, _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
|
|
makeLenses ''SelectionItem
|