Prevent selection of unselectable items when scrolling
This commit is contained in:
@@ -57,7 +57,7 @@ updateUseInputInGame h u = case h of
|
||||
u & uvWorld . cWorld . lWorld . terminals . ix tmid . tmInput . tiFocus %~ const True
|
||||
CombineInventory _ _ sss
|
||||
| inSubInvRegex (u ^. uvWorld) -> doSubInvRegexInput u
|
||||
| lbinitialpress -> maybeExitCombine $ over uvWorld (tryCombine sss) u -- maybeexitcombine (maybe id doCombine mi w)
|
||||
| lbinitialpress -> maybeExitCombine $ over uvWorld (tryCombine sss) u
|
||||
_ | inInvRegex (u ^. uvWorld) -> doRegexInput (-1) invRegex invRegex u
|
||||
_ | inCloseRegex (u ^. uvWorld) -> doRegexInput 2 closeRegex closeRegex u
|
||||
_ -> M.foldlWithKey' updateKeyInGame u pkeys
|
||||
@@ -76,7 +76,7 @@ tryCombine sss w = fromMaybe w $ do
|
||||
maybeExitCombine :: Universe -> Universe
|
||||
maybeExitCombine u
|
||||
| ButtonRight `M.member` (u ^. uvWorld . input . mouseButtons)
|
||||
= u
|
||||
= u & uvWorld %~ enterCombineInv (u ^. uvConfig)
|
||||
| otherwise = u & uvWorld . hud . hudElement . subInventory .~ NoSubInventory
|
||||
|
||||
doTextInputOver :: ASetter' Universe String -> Universe -> Universe
|
||||
|
||||
Reference in New Issue
Block a user