Exemplo n.º 1
0
        // forward drag event to the view controller as "pan" events
        public override void MouseDragged(NSEvent theEvent)
        {
            if (theEvent.ModifierFlags == NSEventModifierMask.AlternateKeyMask)
            {
                var p = ConvertPointFromView(theEvent.LocationInWindow, null);
                GameViewController.TiltCamera(new CGPoint(p.X - ClickLocation.X, p.Y - ClickLocation.Y));
            }
            else
            {
                GameViewController.HandlePan(ConvertPointFromView(theEvent.LocationInWindow, null));
            }

            base.MouseDragged(theEvent);
        }