From 61e85ffd5c20a44d9379f5613d9f6accbfc7d770 Mon Sep 17 00:00:00 2001 From: justin Date: Sun, 1 Jun 2025 10:06:51 +0100 Subject: [PATCH] Improve rotate drag mouse context --- src/Dodge/TestString.hs | 12 ------------ src/Dodge/Update/Input/InGame.hs | 2 ++ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Dodge/TestString.hs b/src/Dodge/TestString.hs index 2882b4147..8e2a48dc4 100644 --- a/src/Dodge/TestString.hs +++ b/src/Dodge/TestString.hs @@ -38,18 +38,6 @@ testStringInit u = [show $ u ^. uvWorld . unpauseClock] -- let itms = IM.elems $ cr ^. crInv -- return $ map (show . (^? itLocation . ilIsSelected)) itms --return . foldMap (prettyLDT (show . (^. _1 . itType))) . invLDT $ _crInv cr - --- [ show $ u ^? uvWorld . input . mouseContext . mcoSelEnd --- , show $ u ^? uvWorld . hud . hudElement . diSelection --- , show $ u ^? uvWorld . input . mouseContext --- , show $ u ^? uvWorld . input . mouseContext . mcoDragSection --- , show $ u ^? uvWorld . input . mouseContext . mcoMaybeSelect --- , show $ u ^? uvWorld . input . mouseContext . mcoAboveSelect --- , show $ u ^? uvWorld . input . mouseContext . mcoBelowSelect --- , show mpos --- , show yint --- , show $ u ^? uvWorld . hud . hudElement . diSections >>= inverseSelSecYint yint --- ] -- where -- idp = invDisplayParams $ u ^. uvWorld -- cfig = u ^. uvConfig diff --git a/src/Dodge/Update/Input/InGame.hs b/src/Dodge/Update/Input/InGame.hs index 4c21db9f8..1ec6aac5e 100644 --- a/src/Dodge/Update/Input/InGame.hs +++ b/src/Dodge/Update/Input/InGame.hs @@ -94,6 +94,8 @@ updateMouseInGame cfig w updateMouseHeldInGame :: Configuration -> World -> World updateMouseHeldInGame cfig w = case w ^. input . mouseContext of + OverInvDragSelect {} | ButtonRight `M.member` (w ^. input . mouseButtons) + -> w & input . mouseContext .~ MouseGameRotate OverInvDragSelect sstart _ -> fromMaybe w $ do sss <- w ^? hud . hudElement . diSections let msel = inverseSelNumPos cfig invDP sss (w ^. input . mousePos)