private void OnMouseMove(object sender, MouseEventArgs e) { if (!isPositionLocked) { MouseState.HandleMove(new Vector2(e.X, e.Y)); } }
private void OnMouseMoveEvent(SDL.SDL_MouseMotionEvent e) { if (IsPositionLocked) { MouseState.HandleMouseDelta(new Vector2(e.xrel, e.yrel)); } else { MouseState.HandleMove(new Vector2(e.x, e.y)); } }
private void OnMouseMoveEvent(MouseMotionEvent e) { if (IsPositionLocked) { MouseState.HandleMouseDelta(new Vector2(e.Xrel, e.Yrel)); } else { MouseState.HandleMove(new Vector2(e.X, e.Y)); } }
private void OnMouseMove(object sender, MouseEventArgs e) { if (isPositionLocked) { // Register mouse delta and reset MouseState.HandleMouseDelta(new Vector2(Cursor.Position.X - capturedPosition.X, Cursor.Position.Y - capturedPosition.Y)); targetPosition = capturedPosition; shouldSetPosition = true; } else { MouseState.HandleMove(new Vector2(e.X, e.Y)); } }
private void OnMouseMoveEvent(SDL.SDL_MouseMotionEvent e) { if (IsPositionLocked) { MouseState.HandleMouseDelta(new Vector2(e.x - relativeCapturedPosition.X, e.y - relativeCapturedPosition.Y)); // Restore position to prevent mouse from going out of the window where we would not get // mouse move event. uiControl.RelativeCursorPosition = relativeCapturedPosition; } else { MouseState.HandleMove(new Vector2(e.x, e.y)); } }