Move scroll smoothing to central location
This commit is contained in:
@@ -7,7 +7,6 @@ import Control.Lens hiding ((<|), (|>))
|
||||
import Data.Sequence
|
||||
import Dodge.Data.Creature
|
||||
import Dodge.Data.World
|
||||
import Dodge.Item.Weapon.ZoomScope
|
||||
import Data.Maybe
|
||||
--import LensHelp hiding ((|>), (<|))
|
||||
-- should be able to just import data.item
|
||||
@@ -15,7 +14,7 @@ import Data.Maybe
|
||||
doHeldScroll :: HeldScroll -> Float -> Creature -> World -> World
|
||||
doHeldScroll hs = case hs of
|
||||
HeldScrollDoNothing -> const . const id
|
||||
HeldScrollZoom -> overYourItem (const . setZoomScopeChange)
|
||||
HeldScrollZoom -> const . const id
|
||||
HeldScrollCharMode{} -> overYourItem $ \x _ -> itUse . heldScroll . hsCharMode %~ cycleSignum x
|
||||
where
|
||||
overYourItem f x cr w = fromMaybe w $ do
|
||||
|
||||
Reference in New Issue
Block a user