Improve rotate drag mouse context
This commit is contained in:
@@ -38,18 +38,6 @@ testStringInit u = [show $ u ^. uvWorld . unpauseClock]
|
|||||||
-- let itms = IM.elems $ cr ^. crInv
|
-- let itms = IM.elems $ cr ^. crInv
|
||||||
-- return $ map (show . (^? itLocation . ilIsSelected)) itms
|
-- return $ map (show . (^? itLocation . ilIsSelected)) itms
|
||||||
--return . foldMap (prettyLDT (show . (^. _1 . itType))) . invLDT $ _crInv cr
|
--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
|
-- where
|
||||||
-- idp = invDisplayParams $ u ^. uvWorld
|
-- idp = invDisplayParams $ u ^. uvWorld
|
||||||
-- cfig = u ^. uvConfig
|
-- cfig = u ^. uvConfig
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ updateMouseInGame cfig w
|
|||||||
|
|
||||||
updateMouseHeldInGame :: Configuration -> World -> World
|
updateMouseHeldInGame :: Configuration -> World -> World
|
||||||
updateMouseHeldInGame cfig w = case w ^. input . mouseContext of
|
updateMouseHeldInGame cfig w = case w ^. input . mouseContext of
|
||||||
|
OverInvDragSelect {} | ButtonRight `M.member` (w ^. input . mouseButtons)
|
||||||
|
-> w & input . mouseContext .~ MouseGameRotate
|
||||||
OverInvDragSelect sstart _ -> fromMaybe w $ do
|
OverInvDragSelect sstart _ -> fromMaybe w $ do
|
||||||
sss <- w ^? hud . hudElement . diSections
|
sss <- w ^? hud . hudElement . diSections
|
||||||
let msel = inverseSelNumPos cfig invDP sss (w ^. input . mousePos)
|
let msel = inverseSelNumPos cfig invDP sss (w ^. input . mousePos)
|
||||||
|
|||||||
Reference in New Issue
Block a user