Start to unify selection lists

This commit is contained in:
2022-11-02 09:36:16 +00:00
parent 7d358fde29
commit 7c8958cea7
7 changed files with 122 additions and 24 deletions
+26
View File
@@ -0,0 +1,26 @@
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.SelectionList where
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
}
data CursorType = NoCursor
data SelectionItem = SelectionItem
{ _siPictures :: [Picture]
, _siHeight :: Int
, _siIsSelectable :: Bool
}
makeLenses ''SelectionList
makeLenses ''SelectionItem
+1
View File
@@ -53,6 +53,7 @@ data ScreenLayer
, _scDefaultEff :: Universe -> Universe
, _scOptionFlag :: OptionScreenFlag
, _scOptionsOffset :: Int
, _scSelPos :: Maybe Int
}
| ColumnsScreen
{ _scTitle :: Universe -> String