Implement generalised storing of position for mouse presses
This commit is contained in:
@@ -65,7 +65,7 @@ windowYFloat = fromIntegral . _windowY
|
||||
|
||||
data DebugBool
|
||||
= Show_ms_frame
|
||||
| Show_debug
|
||||
| Enable_debug
|
||||
| Show_sound
|
||||
| Noclip
|
||||
| Cr_status
|
||||
|
||||
@@ -22,14 +22,12 @@ data Input = Input
|
||||
, _pressedKeys :: M.Map Scancode PressType
|
||||
, _mouseButtons :: M.Map MouseButton Int -- counts number of frames held down
|
||||
, _scrollAmount :: Int
|
||||
, _previousScrollAmount :: Int
|
||||
, _smoothScrollAmount :: Int
|
||||
, _lLine :: (Point2, Point2)
|
||||
, _rLine :: (Point2, Point2)
|
||||
, _lrLine :: (Point2, Point2)
|
||||
, _lSelect :: Point2
|
||||
, _rSelect :: Point2
|
||||
, _clickMousePos :: Point2 -- is this in world or screen coords?
|
||||
, _clickPos :: M.Map MouseButton Point2 -- updates when mouse button is pressed
|
||||
, _heldPos :: M.Map MouseButton Point2 -- updates when mouse button is held
|
||||
-- lags ONE FRAME BEHIND the stored mouse position
|
||||
|
||||
Reference in New Issue
Block a user