Implement generalised storing of position for mouse presses

This commit is contained in:
2023-03-26 23:00:07 +01:00
parent e5906eefa3
commit ee89ac9b00
10 changed files with 27 additions and 39 deletions
+2 -1
View File
@@ -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