Implement generalised storing of position for mouse presses
This commit is contained in:
+2
-1
@@ -8,6 +8,7 @@ module Dodge.Update (updateUniverse) where
|
||||
|
||||
--import Dodge.InputFocus
|
||||
|
||||
import Dodge.Debug
|
||||
import Dodge.SmoothScroll
|
||||
import Color
|
||||
import Control.Applicative
|
||||
@@ -75,6 +76,7 @@ updateUniverse u =
|
||||
. maybeOpenTerminal
|
||||
. over (uvWorld . input . textInput) (const mempty)
|
||||
. updateUniverseMid
|
||||
. debugEvents
|
||||
. updateUseInput -- this should be pushed inside when the universe is paused etc
|
||||
-- OR the keys should be tested "in game", so to speak
|
||||
. over uvWorld (updateCamera cfig)
|
||||
@@ -268,7 +270,6 @@ updateWheelEvents w
|
||||
advanceScrollAmount :: Universe -> Universe
|
||||
advanceScrollAmount u =
|
||||
u
|
||||
& uvWorld . input . previousScrollAmount .~ _scrollAmount (_input $ _uvWorld u)
|
||||
& uvWorld . input . scrollAmount .~ 0
|
||||
& uvWorld . input . smoothScrollAmount %~ advanceSmoothScroll
|
||||
|
||||
|
||||
Reference in New Issue
Block a user