This commit is contained in:
2022-07-27 12:49:23 +01:00
parent 6554d219dc
commit 8d17ce66e9
106 changed files with 2911 additions and 2678 deletions
+33 -21
View File
@@ -1,39 +1,51 @@
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.HUD where
import GHC.Generics
import Data.Aeson
import Geometry.Data
import Control.Lens
data HUDElement
import Data.Aeson
import GHC.Generics
import Geometry.Data
data HUDElement
= DisplayInventory {_subInventory :: SubInventory}
| DisplayCarte
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON HUDElement where
deriving (Eq, Ord, Show, Read, Generic)
instance ToJSON HUDElement where
toEncoding = genericToEncoding defaultOptions
instance FromJSON HUDElement
data SubInventory
instance FromJSON HUDElement
data SubInventory
= NoSubInventory
| TweakInventory
| TweakInventory {_tweakInvSel :: Maybe Int}
| CombineInventory {_combineInvSel :: Maybe Int}
| InspectInventory
| LockedInventory
| DisplayTerminal {_termID :: Int }
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON SubInventory where
| DisplayTerminal {_termID :: Int}
deriving (Eq, Ord, Show, Read, Generic)
instance ToJSON SubInventory where
toEncoding = genericToEncoding defaultOptions
instance FromJSON SubInventory
instance FromJSON SubInventory
data HUD = HUD
{ _hudElement :: HUDElement
, _carteCenter :: Point2
, _carteZoom :: Float
, _carteRot :: Float
{ _hudElement :: HUDElement
, _carteCenter :: Point2
, _carteZoom :: Float
, _carteRot :: Float
}
deriving (Eq,Ord,Show,Read,Generic)
instance ToJSON HUD where
deriving (Eq, Ord, Show, Read, Generic)
instance ToJSON HUD where
toEncoding = genericToEncoding defaultOptions
instance FromJSON HUD
instance FromJSON HUD
makeLenses ''HUD
makeLenses ''HUDElement
makeLenses ''SubInventory