Improve scroll selection

This commit is contained in:
2026-03-24 19:51:32 +00:00
parent 8ff2f37af5
commit e01029d06d
4 changed files with 82 additions and 63 deletions
+2 -3
View File
@@ -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