Partial inventory display update
This commit is contained in:
@@ -17,11 +17,17 @@ data LoadAction
|
||||
| LoadPrime {_actionTime :: Int, _actionSound :: SoundID}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data InvSel
|
||||
data InvSel -- should be ManipulatedObject?
|
||||
= InvSel {_iselPos :: Int, _iselAction :: InvSelAction}
|
||||
| Brute
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data SelPos
|
||||
= SelItem Int
|
||||
| SelNothing
|
||||
| SelCloseObject Int
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data InvSelAction
|
||||
= NoInvSelAction
|
||||
| ReloadAction {_actionProgress :: Int, _reloadAction :: LoadAction}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE StrictData #-}
|
||||
module Dodge.Data.SelectionList where
|
||||
import Picture.Data
|
||||
import Color
|
||||
import Control.Lens
|
||||
import Dodge.Data.CardinalPoint
|
||||
@@ -35,14 +36,20 @@ data SelectionSections a = SelectionSections
|
||||
, _sssMaxSize :: Int
|
||||
}
|
||||
|
||||
data SSRestriction = NoSSRestriction
|
||||
| SSRestriction
|
||||
{ _ssrSize :: Int
|
||||
, _ssrOffset :: Int
|
||||
}
|
||||
|
||||
data SelectionSection a = SelectionSection
|
||||
{ _ssItems :: [SelectionItem a]
|
||||
, _ssSelPos :: Maybe Int
|
||||
, _ssRegex :: String
|
||||
, _ssRegexInput :: Bool
|
||||
, _ssMinSize :: Int
|
||||
, _ssPriority :: Int
|
||||
, _ssOffset :: Int
|
||||
, _ssShownItems :: IntMap (SelectionItem a)
|
||||
, _ssRestriction :: SSRestriction
|
||||
, _ssShownItems :: [Picture]
|
||||
}
|
||||
|
||||
|
||||
@@ -85,5 +92,8 @@ makeLenses ''ListDisplayParams
|
||||
makeLenses ''SelectionList
|
||||
makeLenses ''SelectionItem
|
||||
makeLenses ''SelectionIntMap
|
||||
makeLenses ''SelectionSection
|
||||
makeLenses ''SelectionSections
|
||||
makeLenses ''SSRestriction
|
||||
--deriveJSON defaultOptions ''SelectionItem
|
||||
--deriveJSON defaultOptions ''SelectionList
|
||||
|
||||
Reference in New Issue
Block a user