Start to generalise text input to "terminal signal" input
This commit is contained in:
+4
-3
@@ -74,7 +74,8 @@ updateUniverse u =
|
||||
. maybeOpenTerminal
|
||||
. over (uvWorld . input . textInput) (const mempty)
|
||||
. updateUniverseMid
|
||||
. updateUseInput
|
||||
. 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)
|
||||
. over (uvWorld . input) updateScrollTestValue
|
||||
. over (uvWorld . cWorld . cClock) (+ 1)
|
||||
@@ -281,9 +282,9 @@ zoneClouds :: World -> World
|
||||
zoneClouds w = w & clZoning .~ foldl' (flip zoneCloud) mempty (w ^. cWorld . lWorld . clouds)
|
||||
|
||||
updateWorldSelect' :: World -> World
|
||||
updateWorldSelect' w = over input (updateWorldSelect (w ^. cWorld . cwCamPos)) w
|
||||
updateWorldSelect' w = over input (updateWorldSelect (w ^. cWorld . cwCam)) w
|
||||
|
||||
updateWorldSelect :: CamPos -> Input -> Input
|
||||
updateWorldSelect :: Camera -> Input -> Input
|
||||
updateWorldSelect cam inp = f . g $ case (inp ^? mouseButtons . ix ButtonLeft, inp ^? mouseButtons . ix ButtonRight) of
|
||||
(Just False, Nothing) ->
|
||||
inp & lLine . _1 .~ mwp
|
||||
|
||||
Reference in New Issue
Block a user