58 lines
1.4 KiB
Haskell
58 lines
1.4 KiB
Haskell
{-# LANGUAGE DeriveAnyClass #-}
|
|
{-# LANGUAGE DeriveGeneric #-}
|
|
{-# LANGUAGE StrictData #-}
|
|
{-# LANGUAGE TemplateHaskell #-}
|
|
|
|
module Dodge.Data.HUD where
|
|
|
|
import Control.Lens
|
|
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 ()
|
|
, _diSelection :: Maybe (Int,Int)
|
|
, _diSelectionExtra :: Int
|
|
}
|
|
| DisplayCarte
|
|
|
|
data MouseInventorySelection
|
|
= MouseInvSelect
|
|
{_misSelStart :: (Int, Int), _misMaybeEnd :: Maybe (Int, Int)}
|
|
| MouseInvDrag
|
|
| MouseInvNothing
|
|
|
|
data SubInventory
|
|
= NoSubInventory
|
|
{ _nsSelected :: MouseInventorySelection
|
|
, _nsMouseOver :: Maybe (Int, Int)
|
|
}
|
|
| ExamineInventory
|
|
| CombineInventory {_ciSections :: SelectionSections CombinableItem
|
|
, _ciSelection :: Maybe (Int,Int)
|
|
}
|
|
| 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
|
|
makeLenses ''MouseInventorySelection
|