This commit is contained in:
2024-11-25 22:16:54 +00:00
parent a4998716e9
commit bf6e02bd98
3 changed files with 125 additions and 123 deletions
+6 -7
View File
@@ -210,17 +210,16 @@ updateMouseClickInGame cfig w = case w ^. input . mouseContext of
f (x,y) = (x,y,mempty)
startDrag :: (Int, Int) -> Configuration -> World -> World
startDrag (a, b) cfig w = setcontext . fromMaybe (augInvDirectSelect (a, b, IS.singleton b) w) $ do
(i, _, xs) <- w ^? hud . hudElement . diSelection . _Just
guard $ i == a && b `IS.member` xs
return w
startDrag (a, b) cfig w = setcontext
. fromMaybe (augInvDirectSelect (a, b, IS.singleton b) w) $ do
(i, _, xs) <- w ^? hud . hudElement . diSelection . _Just
guard $ i == a && b `IS.member` xs
return w
where
setcontext = (input . mouseContext .~ OverInvDrag a (Just (a, b)) above bneath)
above :: Maybe (Int,Int)
setcontext = input . mouseContext .~ OverInvDrag a (Just (a, b)) above bneath
above = do
sss <- w ^? hud . hudElement . diSections
inverseSelSecYint (yint - 1) sss
bneath :: Maybe (Int,Int)
bneath = do
sss <- w ^? hud . hudElement . diSections
inverseSelSecYint (yint + 1) sss