/// <summary> /// Release the grabbed mouse. /// </summary> public void ReleaseMouse() { // remove hooked in handlers mouseMoveIntercepter = null; mouseDownIntercepter = null; mouseUpIntercepter = null; mouseIntercepted = false; return; }
/// <summary> /// Grab mouse events for some modal operation in the 3d world /// </summary> /// <param name="mouseMoveEvent"></param> /// <param name="mouseDownEvent"></param> /// <param name="mouseUpEvent"></param> /// <returns></returns> public bool InterceptMouse(MouseMoveIntercepter mouseMove, MouseButtonIntercepter mouseDown, MouseButtonIntercepter mouseUp, MouseCaptureLost lost, bool capture) { if (mouseIntercepted) { return true; } else { // hook in event handlers mouseMoveIntercepter = mouseMove; mouseDownIntercepter = mouseDown; mouseUpIntercepter = mouseUp; mouseCaptureLost = lost; if (capture) { axiomControl.Capture = true; } mouseIntercepted = true; return false; } }