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

57 lines
1.4 KiB
Haskell

{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.HUD where
import qualified Data.IntSet as IS
import Dodge.Data.Item.Location
import NewInt
import Control.Lens
import Data.IntMap
import Data.IntSet (IntSet)
import Dodge.Data.Combine
import Dodge.Data.SelectionList
import Geometry.Data
data HUDElement
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: IMSS ()
, _diSelection :: Maybe (Int, Int, IntSet)
, _diInvFilter :: Maybe String
, _diCloseFilter :: Maybe String
}
| DisplayCarte
--data MouseInventorySelection
-- = MouseInvSelect
-- {_misSelStart :: (Int, Int), _misMaybeEnd :: Maybe (Int, Int)}
-- | MouseInvDrag
-- | MouseInvNothing
data SubInventory
= NoSubInventory
| ExamineInventory
| CombineInventory
{ _ciSections :: IntMap (SelectionSection CombinableItem)
, _ciSelection :: Maybe (Int, Int, IS.IntSet)
, _ciFilter :: Maybe String
}
| LockedInventory
| DisplayTerminal {_termID :: Int}
data HUD = HUD
{ _hudElement :: HUDElement
, _carteCenter :: Point2
, _carteZoom :: Float
, _carteRot :: Float
, _closeItems :: [NewInt FloorInt]
, _closeButtons :: [Int]
}
makeLenses ''HUD
makeLenses ''HUDElement
makeLenses ''SubInventory