Continue inventory refactor

This commit is contained in:
2024-11-24 22:08:36 +00:00
parent 81fcfea1be
commit 82c53fc8e3
10 changed files with 187 additions and 149 deletions
+4 -4
View File
@@ -5,12 +5,12 @@
module Dodge.Data.HUD where
import Dodge.Data.Item.Location
import NewInt
import Control.Lens
import Data.IntMap
import Data.IntSet (IntSet)
import Dodge.Data.Button
import Dodge.Data.Combine
import Dodge.Data.FloorItem
import Dodge.Data.SelectionList
import Geometry.Data
@@ -50,8 +50,8 @@ data HUD = HUD
, _carteCenter :: Point2
, _carteZoom :: Float
, _carteRot :: Float
, _closeItems :: [FloorItem]
, _closeInterfaces :: [Button]
, _closeItems :: [NewInt FloorInt]
, _closeInterfaces :: [Int]
}
makeLenses ''HUD
@@ -12,7 +12,6 @@ import Data.Aeson.TH
--import Sound.Data
data Manipulation -- should be ManipulatedObject?
-- = InvSel {_isel :: SelPos}
= Manipulator {_manObject :: ManipulatedObject
}
| Brute
@@ -20,14 +19,16 @@ data Manipulation -- should be ManipulatedObject?
data ManipulatedObject
= SortInventory
| SelectedItem
| SelectedItem
{ _imSelectedItem :: Int
, _imRootSelectedItem :: Int
, _imAttachedItems :: IS.IntSet
}
| SelNothing
| SortNearby
| SelCloseObject {_ispCloseObject :: Int}
| SortCloseItem
| SelCloseItem {_ispCloseItem :: Int}
| SortCloseButton
| SelCloseButton {_ispCloseButton :: Int}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''ManipulatedObject