Click on combine filter jumps to combination
This commit is contained in:
@@ -191,6 +191,7 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
|
||||
OverCombFilter ->
|
||||
w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
& worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
& hud . hudElement . subInventory . ciSelection %~ endCombineRegex w
|
||||
OverCombCombine x ->
|
||||
w
|
||||
& tryCombine x
|
||||
@@ -232,6 +233,17 @@ endRegex i w = fromMaybe id $ do
|
||||
return k
|
||||
return $ ssSetCursor (ssLookupDown i j) sss
|
||||
|
||||
endCombineRegex ::World
|
||||
-> Maybe (Int,Int,IS.IntSet)
|
||||
-> Maybe (Int,Int,IS.IntSet)
|
||||
endCombineRegex w = fromMaybe id $ do
|
||||
sss <- w ^? hud . hudElement . subInventory . ciSections
|
||||
let j = fromMaybe 0 $ do
|
||||
itms <- sss ^? ix 0 . ssItems
|
||||
(k,_) <- IM.lookupMin itms
|
||||
return (k-1)
|
||||
return $ ssSetCursor (ssLookupDown 0 j) sss
|
||||
|
||||
startDrag :: (Int, Int) -> Configuration -> World -> World
|
||||
startDrag (a, b) cfig w = setcontext
|
||||
. fromMaybe (augInvDirectSelect (a, b, IS.singleton b) w) $ do
|
||||
|
||||
Reference in New Issue
Block a user