void OnJoystickMoved(object sender, JoystickMoveEventArgs e) { //Console.WriteLine("Joystick " + e.JoystickId + " moved axis " + e.Axis + " to " + e.Position); }
/// <summary> /// Handles the JoyMoved event of the <see cref="GameBase.RenderWindow"/>. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="SFML.Window.JoystickMoveEventArgs"/> instance containing the event data.</param> void rw_JoystickMoved(object sender, JoystickMoveEventArgs e) { if (JoyMoved != null) JoyMoved.Raise(this, e); }
/// <summary> /// Protected overridable handler that raises JoystickMoved event. /// </summary> protected virtual void OnJoystickMoved(JoystickMoveEventArgs args) { JoystickMoved?.Invoke(this, args); }
static void JoystickMoved(object sender, JoystickMoveEventArgs e) { EventMgr.Notify (Event.JoystickMoved, e); }
private void window_JoyMoved(object sender, JoystickMoveEventArgs e) { Event evt = new Event(); evt.Type = EventType.JoystickMoved; evt.JoystickMove.Axis = e.Axis; evt.JoystickMove.JoystickId = e.JoystickId; evt.JoystickMove.Position = e.Position; Events.Enqueue(evt); }