Move most wheelEvent functionality into update function
This commit is contained in:
+1
-6
@@ -92,15 +92,10 @@ handleResizeEvent sev u =
|
||||
handleMouseWheelEvent :: MouseWheelEventData -> Universe -> Maybe Universe
|
||||
handleMouseWheelEvent mwev w = case _uvScreenLayers w of
|
||||
[] -> case mouseWheelEventPos mwev of
|
||||
V2 _ y -> Just $ w & uvWorld %~ wheelEvent (fromIntegral y)
|
||||
V2 _ y -> Just $ w -- & uvWorld %~ wheelEvent (fromIntegral y)
|
||||
& uvWorld . scrollAmount +~ fromIntegral y
|
||||
_ -> Just w
|
||||
|
||||
--wheelEvent' :: Int -> World -> World
|
||||
--wheelEvent' y w = case w ^. timeFlow of
|
||||
-- ScrollTimeFlow -> wheelTimeEvent y w
|
||||
-- _ -> wheelEvent y w
|
||||
|
||||
wheelEvent :: Float -> World -> World
|
||||
wheelEvent y w = case _hudElement $ _hud (_cWorld w) of
|
||||
DisplayCarte
|
||||
|
||||
Reference in New Issue
Block a user