Work on inventory ui

This commit is contained in:
2023-05-14 22:22:21 +01:00
parent 3499384d38
commit 1cec50c5ab
9 changed files with 150 additions and 165 deletions
+11 -9
View File
@@ -1,20 +1,20 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# 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)
import Dodge.Data.Button
import Dodge.Data.Combine
import Dodge.Data.FloorItem
import Dodge.Data.SelectionList
import Geometry.Data
data HUDElement
= DisplayInventory
= DisplayInventory
{ _subInventory :: SubInventory
, _diSections :: SelectionSections ()
}
@@ -23,12 +23,13 @@ data HUDElement
data SubInventory
= NoSubInventory
| ExamineInventory {_subInvMSel :: Maybe Int}
-- | CombineInventory {_subInvMap :: SelectionIntMap CombinableItem}
| CombineInventory {_ciCombinations :: IntMap (SelectionItem CombinableItem)
| CombineInventory
{ _ciCombinations :: IntMap (SelectionItem CombinableItem)
, _ciSections :: SelectionSections CombinableItem
}
| LockedInventory
| DisplayTerminal {_termID :: Int}
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
data HUD = HUD
@@ -38,6 +39,7 @@ data HUD = HUD
, _carteRot :: Float
, _closeObjects :: [Either FloorItem Button]
}
-- deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''HUD