Add 8-way cardinal/intercardinal datatype
This commit is contained in:
@@ -5,7 +5,18 @@ data CardinalPoint
|
||||
| East
|
||||
| South
|
||||
| West
|
||||
deriving (Eq, Ord, Show)
|
||||
deriving (Eq, Ord, Show, Bounded, Enum)
|
||||
|
||||
data CardinalEightPoint
|
||||
= North8
|
||||
| NorthEast8
|
||||
| East8
|
||||
| SouthEast8
|
||||
| South8
|
||||
| SouthWest8
|
||||
| West8
|
||||
| NorthWest8
|
||||
deriving (Eq, Ord, Show, Bounded, Enum)
|
||||
|
||||
data CardinalCover
|
||||
= NSEW
|
||||
|
||||
@@ -19,9 +19,15 @@ data HUDElement
|
||||
}
|
||||
| DisplayCarte
|
||||
|
||||
data MouseInventorySelection = NoMouseSel
|
||||
| MouseInvSelect
|
||||
{_misSelStart :: (Int,Int), _misMaybeEnd :: Maybe (Int,Int)}
|
||||
| MouseInvChosen
|
||||
{_misChosenStart :: (Int,Int), _misChosenEnd :: (Int,Int)}
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
{ _nsSelected :: Maybe (Int,Int)
|
||||
{ _nsSelected :: MouseInventorySelection
|
||||
, _nsMouseOver :: Maybe (Int,Int)
|
||||
}
|
||||
| ExamineInventory
|
||||
@@ -44,3 +50,4 @@ data HUD = HUD
|
||||
makeLenses ''HUD
|
||||
makeLenses ''HUDElement
|
||||
makeLenses ''SubInventory
|
||||
makeLenses ''MouseInventorySelection
|
||||
|
||||
Reference in New Issue
Block a user