Improve scroll selection
This commit is contained in:
@@ -29,15 +29,14 @@ updateWheelEvent yi w = case w ^. hud . subInventory of
|
||||
-- yi should be nonzero
|
||||
updateBaseWheelEvent :: Int -> World -> World
|
||||
updateBaseWheelEvent yi w
|
||||
-- | Just True <- w ^? cWorld . lWorld . creatures . ix 0 . crInvLock = w
|
||||
| Just True <- w ^? cWorld . lWorld . lInvLock = w
|
||||
| bdown ButtonRight = case _rbState w of
|
||||
EquipOptions{} -> w & rbState . opSel %~ scrollRBOption yi rbscrollmax
|
||||
NoRightButtonState -> fromMaybe w (selectedItemScroll yi w)
|
||||
| bdown ButtonLeft = w & wCam . camZoom +~ fromIntegral yi
|
||||
| ScancodeCapsLock `M.member` _pressedKeys (_input w)
|
||||
, ScancodeLShift `M.member` (w ^. input . pressedKeys) = changeSwapSelSet yi w
|
||||
| ScancodeCapsLock `M.member` _pressedKeys (_input w) = changeSwapSel yi w
|
||||
, ScancodeLShift `M.member` (w ^. input . pressedKeys) = changeSwapSel yi w
|
||||
| ScancodeCapsLock `M.member` _pressedKeys (_input w) = changeSwapSelSet yi w
|
||||
| ScancodeLShift `M.member` (w ^. input . pressedKeys) = multiSelScroll yi w
|
||||
| otherwise = scrollAugInvSel yi w
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user