Cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user