Improve jump to hotkey

This commit is contained in:
2025-06-01 09:44:03 +01:00
parent 39753755af
commit 59e1207b46
3 changed files with 20 additions and 7 deletions
+2 -2
View File
@@ -175,7 +175,7 @@ updateMouseReleaseInGame w = case w ^. input . mouseContext of
& hud . hudElement . diSelection . _Just . _3 %~ const mempty
OverInvDragSelect ssel (Just esel) ->
w & input . mouseContext .~ MouseInGame
& augInvDirectSelect (f (fst ssel, esel) (h ssel esel))
& invSetSelection (f (fst ssel, esel) (h ssel esel))
_ -> w
where
getuniques x y = IS.union x y IS.\\ IS.intersection x y
@@ -278,7 +278,7 @@ startDrag :: (Int, Int) -> Configuration -> World -> World
startDrag (a, b) cfig w = setcontext
$ case w ^? hud . hudElement . diSelection . _Just of
Just (i,_,xs) | i == a && b `IS.member` xs -> w
_ -> augInvDirectSelect (a, b, IS.singleton b) w
_ -> invSetSelection (a, b, IS.singleton b) w
where
setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b)) above bneath
above = inverseSelSecYint (yint - 1) =<< w ^? hud . hudElement . diSections