Allow selecting using mouse click in combine inventory

This commit is contained in:
2024-11-04 00:53:19 +00:00
parent c1b1611279
commit 1ed09fa8de
2 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
All good (594 modules, at 00:29:19) All good (594 modules, at 00:48:31)
+4 -1
View File
@@ -105,7 +105,10 @@ updateCombineInvClick msel sss w = fromMaybe trydocombination $ do
& hud . hudElement . subInventory . ciFilter .~ Nothing & hud . hudElement . subInventory . ciFilter .~ Nothing
_ -> w & hud . hudElement . subInventory . ciFilter ?~ ("<" ++ str) _ -> w & hud . hudElement . subInventory . ciFilter ?~ ("<" ++ str)
where where
trydocombination = trydocombination = case w ^? hud . hudElement . subInventory . ciMouseOver . _Just of
x@Just{} | x /= msel -> w & hud . hudElement . subInventory . ciSelection .~ x
& worldEventFlags . at CombineInventoryChange ?~ ()
_ ->
(worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $ (worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $
tryCombine sss msel w tryCombine sss msel w
& worldEventFlags . at CombineInventoryChange ?~ () & worldEventFlags . at CombineInventoryChange ?~ ()