VirtualJoystick constructor

VirtualJoystick()

Creates a new virtual joystick.

Implementation

VirtualJoystick() : super(new Size(160.0, 160.0)) {
  userInteractionEnabled = true;
  handleMultiplePointers = false;
  position = new Offset(160.0, -20.0);
  pivot = new Offset(0.5, 1.0);
  _center = new Offset(size.width / 2.0, size.height / 2.0);
  _handlePos = _center;

  _paintHandle = new Paint()
    ..color=new Color(0xffffffff);
  _paintControl = new Paint()
    ..color=new Color(0xffffffff)
    ..strokeWidth = 1.0
    ..style = PaintingStyle.stroke;
}