Tweak mouse context/cursors
This commit is contained in:
@@ -108,7 +108,7 @@ updateCombineInvClick ::
|
||||
World ->
|
||||
World
|
||||
updateCombineInvClick msel sss w = fromMaybe trydocombination $ do
|
||||
(i,j) <- w ^? input . mouseContext . mcoInv
|
||||
(i,j) <- w ^? input . mouseContext . mcoInvFilt
|
||||
guard $ i == 0
|
||||
str <- fmap (take 5) $ w
|
||||
^? hud . hudElement . diSections . ix i . ssItems . ix j . siPictures . ix 0
|
||||
@@ -118,18 +118,26 @@ updateCombineInvClick msel sss w = fromMaybe trydocombination $ do
|
||||
& hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
_ -> w & hud . hudElement . subInventory . ciFilter ?~ ("<" ++ str)
|
||||
where
|
||||
trydocombination = case w ^? input . mouseContext . mcoCombInv of
|
||||
x@(Just (i,_))
|
||||
| x /= msel -> w & hud . hudElement . subInventory . ciSelection .~ x
|
||||
trydocombination = case w ^. input . mouseContext of
|
||||
OverCombSelect x -> w & hud . hudElement . subInventory . ciSelection ?~ x
|
||||
& worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
| i == -1 -> w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
OverCombFilter -> w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
& worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
_ | (w ^? hud . hudElement . subInventory . ciSelection . _Just . _1) == Just (-1)
|
||||
-> w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
& worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
_ -> (worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $
|
||||
OverCombCombine (i,j) -> (worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $
|
||||
tryCombine sss msel w
|
||||
& worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
|
||||
-- x@(Just (i,_))
|
||||
-- | x /= msel -> w & hud . hudElement . subInventory . ciSelection .~ x
|
||||
-- & worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
-- | i == -1 -> w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
-- & worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
-- _ | (w ^? hud . hudElement . subInventory . ciSelection . _Just . _1) == Just (-1)
|
||||
-- -> w & hud . hudElement . subInventory . ciFilter .~ Nothing
|
||||
-- & worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
-- _ -> (worldEventFlags . at InventoryChange ?~ ()) . maybeExitCombine $
|
||||
-- tryCombine sss msel w
|
||||
-- & worldEventFlags . at CombineInventoryChange ?~ ()
|
||||
|
||||
updatePressedButtonsCarte :: World -> World
|
||||
updatePressedButtonsCarte w = updatePressedButtonsCarte' (_mouseButtons (_input w)) w
|
||||
|
||||
Reference in New Issue
Block a user