Joystick Control


Hello everyone. Here is my joystick control to allow an object to move via the joystick control that is contained herein. Below is an except code snippet.

private void OnMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if
( isActive )
{
MouseAt =
new
Point( e.X, e.Y );
PolarAtOld = MakeGrid( MouseAt );
magnitude = MagnitudeFromCenter();
GetCompassDirection();
OnPolarMouse(
this.Magnitude, this
.CompassPoint );
}
}
[BrowsableAttribute(
true
),CategoryAttribute("Joystick"),DescriptionAttribute("Magnitude of the crosshair from the center")]

public double Magnitude
{
get
{ return
magnitude; }
}

As you can see that there is Designer support added so that the joystick is configurable.