protected virtual void OnPositionChanged() { // Report the X,Y coordinates in relationship to the center fo the joystick JoystickPositionEventArgs args = new JoystickPositionEventArgs(); args.PositionX = ((int)_centerX - _positionX) * -1; args.PositionY = (int)_centerY - _positionY; PositionChanged?.Invoke(this, args); }
private void _joystick_PositionChanged(object sender, JoystickPositionEventArgs e) { _positionTextView.Text = $"X:{e.PositionX} Y:{e.PositionY}"; }