Delete cruft, add Reader monad to some internal ai
This commit is contained in:
+8
-8
@@ -108,14 +108,14 @@ wheelUpEvent w = case _carteDisplay w of
|
||||
|
||||
wheelDownEvent :: World -> World
|
||||
wheelDownEvent w = case _carteDisplay w of
|
||||
True | rbDown -> w & carteZoom .~ max 0.05 (z-(0.1*z))
|
||||
| otherwise -> w & selLocation %~ (`mod` numLocs) . (\i -> i + 1)
|
||||
False | rbDown -> fromMaybe (closeObjScrollDown w)
|
||||
$ (yourItem w ^? itScrollDown)
|
||||
<*> pure (_crInvSel (you w))
|
||||
<*> pure w
|
||||
| lbDown -> w {_cameraZoom = max (_cameraZoom w - 0.1) 0.01}
|
||||
| otherwise -> downInvPos w
|
||||
True
|
||||
| rbDown -> w & carteZoom .~ max 0.05 (z-(0.1*z))
|
||||
| otherwise -> w & selLocation %~ (`mod` numLocs) . (+ 1)
|
||||
False
|
||||
| rbDown -> fromMaybe (closeObjScrollDown w)
|
||||
$ (yourItem w ^? itScrollDown) <*> pure (_crInvSel (you w)) <*> pure w
|
||||
| lbDown -> w {_cameraZoom = max (_cameraZoom w - 0.1) 0.01}
|
||||
| otherwise -> downInvPos w
|
||||
where
|
||||
rbDown = ButtonRight `S.member` _mouseButtons w
|
||||
lbDown = ButtonLeft `S.member` _mouseButtons w
|
||||
|
||||
Reference in New Issue
Block a user