This commit is contained in:
2022-12-31 23:01:54 +00:00
parent 0dc9a09723
commit 8838d1120b
6 changed files with 54 additions and 71 deletions
+4 -4
View File
@@ -28,7 +28,7 @@ updateWheelEvent yi w = case w ^. hud . hudElement of
-- this lock can be sensibly applied, perhaps
| w ^?! cWorld . lWorld . creatures . ix 0 . crInvLock -> w
| rbDown -> case (yourItem w ^? _Just . itUse . heldScroll, _rbOptions w) of
(_, EquipOptions{}) -> scrollRBOption yi w
(_, EquipOptions{}) -> w & rbOptions %~ scrollRBOption yi
(Nothing, _) -> closeObjScrollDir y w
(Just f, _) -> doHeldScroll f y (you w) w
| lbDown -> w & cWorld . camPos . camZoom +~ y
@@ -92,10 +92,10 @@ terminalWheelEvent yi tmid w
tc = scrollCommands tm !! i
arg = getArguments' tc tm w' !! j
scrollRBOption :: Int -> World -> World
scrollRBOption :: Int -> RightButtonOptions -> RightButtonOptions
scrollRBOption y w
| y < 0 = w & rbOptions . opSel %~ (min (length (_opEquip (_rbOptions w)) -1) . subtract y)
| y > 0 = w & rbOptions . opSel %~ (max 0 . subtract y)
| y < 0 = w & opSel %~ (min (length (_opEquip w) -1) . subtract y)
| y > 0 = w & opSel %~ (max 0 . subtract y)
| otherwise = w
moveTweakSel :: Int -> World -> World