//-------------------------------------------------------------------------------------------------- void _UpdateMouseMoveMode(MouseDevice mouseDevice) { if (mouseDevice?.MiddleButton == MouseButtonState.Pressed) { if (Keyboard.IsKeyDown(Key.LeftCtrl)) { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.Twisting; } else if (ViewportController.LockedToPlane) { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.Panning; } else { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.Rotating; } } else if (mouseDevice?.RightButton == MouseButtonState.Pressed) { if (Keyboard.IsKeyDown(Key.LeftCtrl)) { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.Zooming; } else { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.Panning; } } else { _CurrentMouseMoveMode = ViewportController.MouseMoveMode.None; } }
//-------------------------------------------------------------------------------------------------- public void Cancel() { ViewportController?.MouseMove(new Point(-1, -1), ViewportController.MouseMoveMode.None); _CurrentMouseMoveMode = ViewportController.MouseMoveMode.None; }