Allow for left click to start and pause reloading when aiming
This commit is contained in:
+1
-3
@@ -68,11 +68,9 @@ handleMouseMotionEvent mmev u = Just $ u & uvWorld . mousePos .~ V2
|
||||
handleMouseButtonEvent :: MouseButtonEventData -> World -> World
|
||||
handleMouseButtonEvent mbev = case mouseButtonEventMotion mbev of
|
||||
Released -> mouseButtons . at thebutton .~ Nothing
|
||||
Pressed -> handlePressedMouseButton thebutton . (mouseButtons . at thebutton %~ f)
|
||||
Pressed -> handlePressedMouseButton thebutton . (mouseButtons . at thebutton ?~ False)
|
||||
where
|
||||
thebutton = mouseButtonEventButton mbev
|
||||
f Nothing = Just False
|
||||
f _ = Just True
|
||||
|
||||
{- | Sets window position in config. -}
|
||||
handleWindowMoveEvent :: WindowMovedEventData -> Universe -> Maybe Universe
|
||||
|
||||
Reference in New Issue
Block a user