Fix rb scrolling
This commit is contained in:
@@ -75,13 +75,11 @@ updateKeyInGame uv sc InitialPress = case sc of
|
||||
ScancodeP -> pauseGame uv
|
||||
ScancodeF -> over uvWorld youDropItem uv
|
||||
ScancodeM -> over uvWorld toggleMap uv
|
||||
ScancodeR -> over uvWorld (crToggleReloading (you w)) uv
|
||||
ScancodeR -> over (uvWorld . cWorld . lWorld . creatures . ix 0) crToggleReloading uv
|
||||
ScancodeT -> over uvWorld testEvent uv
|
||||
ScancodeX -> uv & uvWorld %~ toggleTweakInv
|
||||
ScancodeC -> over uvWorld toggleCombineInv uv
|
||||
_ -> uv
|
||||
where
|
||||
w = _uvWorld uv
|
||||
updateKeyInGame uv _ _ = uv
|
||||
|
||||
pauseGame :: Universe -> Universe
|
||||
|
||||
@@ -94,7 +94,7 @@ terminalWheelEvent yi tmid w
|
||||
|
||||
scrollRBOption :: Int -> World -> World
|
||||
scrollRBOption y w
|
||||
| y < 0 = w & rbOptions . opSel %~ (min (length (_opEquip (_rbOptions w)) -1) . (+ y))
|
||||
| y < 0 = w & rbOptions . opSel %~ (min (length (_opEquip (_rbOptions w)) -1) . subtract y)
|
||||
| y > 0 = w & rbOptions . opSel %~ (max 0 . subtract y)
|
||||
| otherwise = w
|
||||
|
||||
|
||||
Reference in New Issue
Block a user