Continue mouse refactor, add explicit release event/timer
This commit is contained in:
@@ -24,16 +24,16 @@ data HUDElement
|
||||
}
|
||||
| DisplayCarte
|
||||
|
||||
data MouseInventorySelection
|
||||
= MouseInvSelect
|
||||
{_misSelStart :: (Int, Int), _misMaybeEnd :: Maybe (Int, Int)}
|
||||
| MouseInvDrag
|
||||
| MouseInvNothing
|
||||
--data MouseInventorySelection
|
||||
-- = MouseInvSelect
|
||||
-- {_misSelStart :: (Int, Int), _misMaybeEnd :: Maybe (Int, Int)}
|
||||
-- | MouseInvDrag
|
||||
-- | MouseInvNothing
|
||||
|
||||
data SubInventory
|
||||
= NoSubInventory
|
||||
{ _nsSelected :: MouseInventorySelection
|
||||
}
|
||||
-- { _nsSelected :: MouseInventorySelection
|
||||
-- }
|
||||
| ExamineInventory
|
||||
| CombineInventory
|
||||
{ _ciSections :: IntMap (SelectionSection CombinableItem)
|
||||
@@ -54,4 +54,4 @@ data HUD = HUD
|
||||
makeLenses ''HUD
|
||||
makeLenses ''HUDElement
|
||||
makeLenses ''SubInventory
|
||||
makeLenses ''MouseInventorySelection
|
||||
--makeLenses ''MouseInventorySelection
|
||||
|
||||
@@ -23,7 +23,7 @@ data MouseContext
|
||||
| MouseMenuClick {_mcoMenuClick :: Int}
|
||||
| MouseMenuCursor
|
||||
| OverInvDrag
|
||||
| OverInvDragSelect { _mcoSelStart :: (Int,Int), _mcoSelEnd :: (Int,Int) }
|
||||
| OverInvDragSelect { _mcoSelStart :: (Int,Int), _mcoSelEnd :: Maybe (Int,Int) }
|
||||
| OverInvSelect { _mcoInvSelect :: (Int,Int)}
|
||||
| OverInvFilt { _mcoInvFilt :: (Int,Int)}
|
||||
| OverCombSelect { _mcoCombSelect :: (Int,Int)}
|
||||
@@ -40,6 +40,7 @@ data Input = Input
|
||||
, _mouseMoving :: Bool
|
||||
, _pressedKeys :: M.Map Scancode PressType
|
||||
, _mouseButtons :: M.Map MouseButton Int -- counts number of frames held down
|
||||
, _mouseButtonsReleased :: M.Map MouseButton Int -- counts number of frames released
|
||||
, _scrollAmount :: Int
|
||||
, _smoothScrollAmount :: Int
|
||||
, _clickPos :: M.Map MouseButton Point2 -- updates on initial mouse button press
|
||||
|
||||
Reference in New Issue
Block a user