Files
loop/src/Dodge/Data/HUD.hs
T

48 lines
1.3 KiB
Haskell

{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.HUD where
import Dodge.Data.Combine
import Dodge.Data.SelectionList
import Dodge.Data.Button
import Dodge.Data.FloorItem
import Control.Lens
import Geometry.Data
import Data.IntMap.Strict (IntMap)
data HUDElement
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: SelectionSections ()
}
| DisplayCarte
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
data SubInventory
= NoSubInventory
| ExamineInventory {_subInvMSel :: Maybe Int}
-- | CombineInventory {_subInvMap :: SelectionIntMap CombinableItem}
| CombineInventory {_ciCombinations :: IntMap (SelectionItem CombinableItem)
, _ciRegex :: Maybe String
, _ciSections :: SelectionSections CombinableItem
}
| LockedInventory
| DisplayTerminal {_termID :: Int}
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
data HUD = HUD
{ _hudElement :: HUDElement
, _carteCenter :: Point2
, _carteZoom :: Float
, _carteRot :: Float
, _closeObjects :: [Either FloorItem Button]
}
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''HUD
makeLenses ''HUDElement
makeLenses ''SubInventory