Start unifying drawn cursors
This commit is contained in:
+8
-5
@@ -68,6 +68,7 @@ import qualified Data.Text as T
|
||||
updateUniverse :: Universe -> Universe
|
||||
updateUniverse u =
|
||||
updateUniverseLast
|
||||
. advanceScrollAmount
|
||||
. maybeOpenTerminal
|
||||
. over (uvWorld . input . textInput) (const mempty)
|
||||
. updateUniverseMid
|
||||
@@ -91,7 +92,7 @@ gotoTerminal w = case _uvScreenLayers w of
|
||||
updateUseInput :: Universe -> Universe
|
||||
updateUseInput u = case u ^? uvScreenLayers . _head of
|
||||
Just (InputScreen thetext _) -> doInputScreenInput thetext u
|
||||
Just OptionScreen{_scOptions = mos, _scDefaultEff = defeff} ->
|
||||
Just OptionScreen{_scOptions = mos, _scDefaultEff = defeff} -> menuWheelEvents $
|
||||
foldl' (\u' scode -> optionListToEffects defeff scode mos u') u (M.keys $ M.filter (== InitialPress) pkeys)
|
||||
Just ColumnsScreen{} -> u & uvScreenLayers %~ tail
|
||||
_ -> case u ^? uvWorld . cWorld . lWorld . hud . hudElement . subInventory of
|
||||
@@ -121,10 +122,7 @@ updateUniverseMid u = case _uvScreenLayers u of
|
||||
. updateClouds
|
||||
)
|
||||
(_ : _) -> u
|
||||
[] -> functionalUpdate'' u
|
||||
|
||||
functionalUpdate'' :: Universe -> Universe
|
||||
functionalUpdate'' = advanceScrollAmount . functionalUpdate'
|
||||
[] -> functionalUpdate' u
|
||||
|
||||
functionalUpdate' :: Universe -> Universe
|
||||
functionalUpdate' u = case u ^. uvWorld . cWorld . timeFlow of
|
||||
@@ -234,6 +232,11 @@ functionalUpdate w =
|
||||
. over uvWorld updateWheelEvents
|
||||
$ over uvWorld updatePastWorlds w
|
||||
|
||||
menuWheelEvents :: Universe -> Universe
|
||||
menuWheelEvents u = u & uvScreenLayers . _head . scSelPos . _Just -~ y
|
||||
where
|
||||
y = u ^. uvWorld . input . scrollAmount
|
||||
|
||||
updateWheelEvents :: World -> World
|
||||
updateWheelEvents w = foldr ($) w (replicate (abs y) (updateWheelEvent (signum y)))
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user