Tweak combine inventory regex
This commit is contained in:
@@ -30,10 +30,11 @@ updateUsingInput w = case w ^. hud . hudElement of
|
||||
pressedMBEffects :: SubInventory -> M.Map MouseButton Bool -> World -> World
|
||||
pressedMBEffects subinv pkeys w = case subinv of
|
||||
NoSubInventory -> pressedMBEffectsNoInventory pkeys w
|
||||
CombineInventory SelectionIntMap{_smSelPos = mi, _smRegexInput = False}
|
||||
| lbinitialpress -> maybeexitcombine (maybe id doCombine mi w)
|
||||
CombineInventory SelectionIntMap{_smRegexInput = True}
|
||||
| lbinitialpress -> w & hud . hudElement . subInventory . subInvMap . smRegexInput .~ False
|
||||
CombineInventory SelectionIntMap{_smSelPos = mi, _smRegex = smr}
|
||||
| lbinitialpress && regexnotinput smr -> maybeexitcombine (maybe id doCombine mi w)
|
||||
CombineInventory SelectionIntMap{}
|
||||
| lbinitialpress -> w & hud . hudElement . subInventory . subInvMap . smRegex. smrInput
|
||||
%~ const False
|
||||
DisplayTerminal tmid
|
||||
| lbinitialpress && inTermFocus w ->
|
||||
doTerminalEffectLB (w ^?! cWorld . lWorld . terminals . ix tmid) w
|
||||
@@ -41,6 +42,7 @@ pressedMBEffects subinv pkeys w = case subinv of
|
||||
w & cWorld . lWorld . terminals . ix tmid . tmInput . tiFocus %~ const True
|
||||
_ -> w
|
||||
where
|
||||
regexnotinput smr = not $ smr ^? smrInput == Just True
|
||||
lbinitialpress = pkeys ^? ix ButtonLeft == Just False
|
||||
maybeexitcombine w'
|
||||
| ButtonRight `M.member` _mouseButtons (_input w) =
|
||||
|
||||
Reference in New Issue
Block a user