Work on menus
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.SelectionList where
|
||||
import Color
|
||||
import Picture.Data
|
||||
@@ -13,14 +14,36 @@ data SelectionList = SelectionList
|
||||
, _slScale :: Float
|
||||
, _slVerticalGap :: Float
|
||||
, _slItems :: [SelectionItem]
|
||||
, _slShownItems :: [(SelectionItem,SelectionItemIndex)]
|
||||
, _slSelPos :: Maybe Int
|
||||
, _slCursorType :: CursorType
|
||||
, _slWidth :: SelectionWidth
|
||||
, _slLength :: Int
|
||||
, _slSizeRestriction :: SelectionSizeRestriction
|
||||
, _slSpecialItem :: SpecialSelectionItem
|
||||
}
|
||||
|
||||
data SelectionItemIndex = ListedSelectionItem Int
|
||||
| ScrollUpSelectionItem
|
||||
| ScrollDownSelectionItem
|
||||
| SpecialSelectionItem
|
||||
|
||||
data SpecialSelectionItem = NoSpecialSelectionItem
|
||||
| BottomSelectionItem {_bottomSelectionItem :: SelectionItem}
|
||||
|
||||
data SelectionSizeRestriction = NoSelectionSizeRestriction
|
||||
| SelectionSizeRestriction
|
||||
{ _maxSelectionLines :: Int
|
||||
, _overflowItemTop :: SelectionItem
|
||||
, _overflowItemBottom :: SelectionItem
|
||||
, _ssrType :: SSRType
|
||||
}
|
||||
|
||||
newtype SSRType = SSRFromScreenBottom {_ssrFromScreenBottom :: Float}
|
||||
|
||||
data SelectionWidth = FixedSelectionWidth Int
|
||||
| VariableSelectionWidth [Int]
|
||||
| VariableSelectionWidth (Int -> Int)
|
||||
| UseMaxSelectionItemWidth
|
||||
|
||||
data CursorType = NoCursor
|
||||
| BorderCursor (Set CardinalPoint)
|
||||
@@ -36,3 +59,6 @@ data SelectionItem = SelectionItem
|
||||
|
||||
makeLenses ''SelectionList
|
||||
makeLenses ''SelectionItem
|
||||
makeLenses ''SpecialSelectionItem
|
||||
makeLenses ''SelectionSizeRestriction
|
||||
makeLenses ''SSRType
|
||||
|
||||
Reference in New Issue
Block a user