Example #1
0
        public virtual void OnMouseActivity(Object sender, MouseActivityArgs mea)
        {
            switch (mea.ActivityType)
            {
                case MouseActivityType.MouseDown:
                    SetMousePosition(mea.X, mea.Y);
                    if (mea.ButtonActivity == MouseButtonActivity.LeftButtonDown)
                        SetMouseLeft(true);
                    if (mea.ButtonActivity == MouseButtonActivity.RightButtonDown)
                        SetMouseRight(true);
                    break;

                case MouseActivityType.MouseUp:
                    SetMousePosition(mea.X, mea.Y);
                    if (mea.ButtonActivity == MouseButtonActivity.LeftButtonUp)
                        SetMouseLeft(false);
                    if (mea.ButtonActivity == MouseButtonActivity.RightButtonUp)
                        SetMouseRight(false);
                    break;

                case MouseActivityType.MouseMove:
                    if (this.fMouseLeftDown)
                    {
                        RotateCamera(new Vector2i(mea.X, mea.Y));
                    }
                    if (this.fMouseRightDown)
                    {
                        ZoomCamera(mea.Y);
                    }
                    break;
            }
        }
Example #2
0
 public override void OnNext(MouseActivityArgs mea)
 {
     fController.OnNext(mea);
 }