Refactor triplet to Selection datatype
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
module Dodge.Data.HUD where
|
||||
|
||||
import Control.Lens
|
||||
import Data.IntSet (IntSet)
|
||||
import qualified Data.IntSet as IS
|
||||
import Dodge.Data.Combine
|
||||
import Dodge.Data.Item.Location
|
||||
@@ -24,7 +23,7 @@ data SubInventory
|
||||
}
|
||||
| CombineInventory
|
||||
{ _ciSections :: IMSS CombinableItem
|
||||
, _ciSelection :: Maybe (Int, Int, IS.IntSet)
|
||||
, _ciSelection :: Maybe Selection
|
||||
, _ciFilter :: Maybe String
|
||||
}
|
||||
| DisplayTerminal {_termID :: Int}
|
||||
@@ -32,7 +31,7 @@ data SubInventory
|
||||
data HUD = HUD
|
||||
{ _subInventory :: SubInventory
|
||||
, _diSections :: IMSS ()
|
||||
, _diSelection :: Maybe (Int, Int, IntSet)
|
||||
, _diSelection :: Maybe Selection
|
||||
, _diInvFilter :: Maybe String
|
||||
, _diCloseFilter :: Maybe String
|
||||
, _carteCenter :: Point2
|
||||
@@ -42,9 +41,8 @@ data HUD = HUD
|
||||
, _closeButtons :: [Int]
|
||||
}
|
||||
|
||||
data Selection
|
||||
= Sel {_slSec :: Int, _slInt :: Int, _slSet :: IS.IntSet}
|
||||
| NoSel
|
||||
data Selection = Sel {_slSec :: Int, _slInt :: Int, _slSet :: IS.IntSet}
|
||||
|
||||
makeLenses ''HUD
|
||||
makeLenses ''Selection
|
||||
makeLenses ''SubInventory
|
||||
|
||||
Reference in New Issue
Block a user