Exemplo n.º 1
0
            protected override void OnMouseMove(Alt.GUI.MouseEventArgs e)
            {
                base.OnMouseMove(e);

                if (rMouseDown)
                {
                    Alt.Sketch.Vector2 diff = e.Location - lastp;
                    m_OffsetX += diff.X;
                    m_OffsetY += diff.Y;
                }
                lastp = e.Location;
            }
Exemplo n.º 2
0
    protected void FarseerPhysics_onMouseMove(Alt.GUI.MouseEventArgs e)
    {
        if (m_Test == null)
        {
            return;
        }

        Alt.Sketch.Vector2 wdiff = m_Test.ConvertScreenToWorld(e.X, e.Y) - m_Test.ConvertScreenToWorld(lastp.X, lastp.Y);
        if (rMouseDown)
        {
            m_Test.m_OffsetX += wdiff.X;
            m_Test.m_OffsetY -= wdiff.Y;
        }
        lastp = e.Location;

        m_Test.MouseMove(e, m_Test.ConvertScreenToWorld(e.X, e.Y), wdiff);
    }
Exemplo n.º 3
0
    protected void Box2D_onMouseDown(Alt.GUI.MouseEventArgs e)
    {
        if (m_Test == null)
        {
            return;
        }

        if (e.Button == Alt.GUI.MouseButtons.Left)
        {
            Alt.Sketch.Vector2 p = ConvertScreenToWorld(e.X, e.Y);

            /*TEMP
            *  if (Alt.GUI.Control.IsShiftDown)
            *  {
            *       m_Test.ShiftMouseDown(p);
            *  }
            *  else*/
            {
                m_Test.MouseDown(p);
            }
        }
    }