Files
loop/src/Dodge/Data/HUD.hs
T
2024-09-30 14:07:20 +01:00

48 lines
1.1 KiB
Haskell

{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.HUD where
import Control.Lens
import Data.IntMap.Strict (IntMap)
import Dodge.Data.Button
import Dodge.Data.Combine
import Dodge.Data.FloorItem
import Dodge.Data.SelectionList
import Geometry.Data
data HUDElement
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: SelectionSections ()
}
| DisplayCarte
data SubInventory
= NoSubInventory
| ExamineInventory -- {_subInvMSel :: Maybe Int}
| CombineInventory
{ _ciCombinations :: IntMap (SelectionItem CombinableItem)
, _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