Improve jump to hotkey
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user