Work on mouse wheel scrolling

This commit is contained in:
2022-10-25 22:59:01 +01:00
parent 86a9ab7582
commit 4ffd361f11
15 changed files with 143 additions and 57 deletions
+8 -8
View File
@@ -8,7 +8,7 @@ import Data.Sequence
import Dodge.Data.Creature
import Dodge.Data.World
import Dodge.Item.Weapon.ZoomScope
import LensHelp hiding ((|>), (<|))
--import LensHelp hiding ((|>), (<|))
-- should be able to just import data.item
doHeldScroll :: HeldScroll -> Float -> Creature -> World -> World
@@ -22,13 +22,13 @@ doHeldScroll hs = case hs of
overYourItem f x cr w = w & cWorld . creatures . ix 0 . crInv . ix (crSel $ you w) %~ f x cr
doScrollTime :: Float -> Creature -> World -> World
doScrollTime x _ w
| x > 0 = case _futureWorlds $ _cwTime w of
(w':ws) -> w -- & cWorld .~ w'
-- & cwTime . futureWorlds %~ tail
-- & cwTime . rewindWorlds .:~ _cWorld w
_ -> w
| otherwise = w
doScrollTime _ _ w = w
-- | x > 0 = case _futureWorlds $ _cwTime w of
-- (w':ws) -> w -- & cWorld .~ w'
-- -- & cwTime . futureWorlds %~ tail
-- -- & cwTime . rewindWorlds .:~ _cWorld w
-- _ -> w
-- | otherwise = w
cycleSignum :: Float -> Seq a -> Seq a
cycleSignum x
| x > 0 = cycleL