Пример #1
0
 public Vector2 LocalToDesktop(Vector2 localPosition)
 {
     return(SDToLime.Convert(
                glControl.PointToScreen(LimeToSD.ConvertToPoint(localPosition, PixelScale)),
                PixelScale
                ));
 }
Пример #2
0
 public Vector2 DesktopToLocal(Vector2 desktopPosition)
 {
     return(SDToLime.Convert(
                glControl.PointToClient(new Point((int)desktopPosition.X, (int)desktopPosition.Y)),
                PixelScale
                ));
 }
Пример #3
0
 public Vector2 DesktopToLocal(Vector2 desktopPosition)
 {
     return(SDToLime.Convert(
                renderControl.PointToClient(LimeToSD.ConvertToPoint(desktopPosition, PixelScale)),
                PixelScale
                ));
 }
Пример #4
0
        private void RefreshMousePosition()
        {
            if (lastMousePosition == Control.MousePosition)
            {
                return;
            }
            lastMousePosition = Control.MousePosition;
            var position = SDToLime.Convert(glControl.PointToClient(Control.MousePosition), PixelScale);

            Input.MousePosition = position * Input.ScreenToWorldTransform;
            Input.SetTouchPosition(0, Input.MousePosition);
        }