Generalise weapon character modes

This commit is contained in:
2021-04-29 23:13:41 +02:00
parent 6a38950501
commit 619756dd73
8 changed files with 129 additions and 127 deletions
+7 -5
View File
@@ -88,14 +88,16 @@ handlePressedMouseButton but w
wheelUpEvent :: World -> World
wheelUpEvent w = case _carteDisplay w of
True | rbDown -> w & carteZoom .~ min 0.75 (z+(0.1*z))
| otherwise -> w & selLocation %~ (`mod` numLocs) . (\i -> i - 1)
_ | rbDown -> fromMaybe (closeObjScrollUp w)
True
| rbDown -> w & carteZoom .~ min 0.75 (z+(0.1*z))
| otherwise -> w & selLocation %~ (`mod` numLocs) . (\i -> i - 1)
_
| rbDown -> fromMaybe (closeObjScrollUp w)
$ (yourItem w ^? itScrollUp)
<*> pure (_crInvSel (you w))
<*> pure w
| lbDown -> w & cameraZoom +~ 0.1
| otherwise -> upInvPos w
| lbDown -> w & cameraZoom +~ 0.1
| otherwise -> upInvPos w
where
rbDown = ButtonRight `S.member` _mouseButtons w
lbDown = ButtonLeft `S.member` _mouseButtons w