private void realInput_ButtonDown(object sender, JoystickButtonEventArgs e) { if (this.pipeButtonDown != null) this.pipeButtonDown(sender, e); }
private void Joystick_ButtonDown(object sender, JoystickButtonEventArgs e) { if (e.Button == mapping.ButtonBrake) // Trigger isBraking = true; if (e.Button == mapping.ButtonLimitRotation) // Grip isLimit = true; if (e.Button == mapping.ButtonPreviousImage) { // Thumb bottom left PoincareWindow.ImageIndex--; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonNextImage) { // Thumb bottom right PoincareWindow.ImageIndex++; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonInvert) { // Thumb top left PoincareWindow.IsInverting = !PoincareWindow.IsInverting; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonRandomize) {// Thumb top right PoincareWindow.Randomize(); } if (e.Button == mapping.ButtonAutoMove) // Pad 7 PoincareWindow.IsMoving = !PoincareWindow.IsMoving; if (e.Button == mapping.ButtonAutoRandomize) // Pad 8 PoincareWindow.IsRandomizing = !PoincareWindow.IsRandomizing; if (e.Button == mapping.ButtonRecenter) { // Pad 9 PoincareWindow.Offset = Complex.Zero; PoincareWindow.AngleOffset = 0; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonReset) { // Pad 10 PoincareWindow.Offset = Complex.Zero; PoincareWindow.AngleOffset = 0; PoincareWindow.P = 5; PoincareWindow.Q = 5; PoincareWindow.ImageIndex = 0; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonPreviousImage2) { // Pad 11 PoincareWindow.ImageIndex--; PoincareWindow.Reset(); } if (e.Button == mapping.ButtonNextImage2) { // Pad 12 PoincareWindow.ImageIndex++; PoincareWindow.Reset(); } }
private void Joystick_ButtonDown(object sender, JoystickButtonEventArgs e) { if (mapping.ButtonDecrement.Contains(e.Button)) { int index = mapping.ButtonDecrement.ToList().IndexOf(e.Button); SunflowerWindow.Actors[index].Modulo--; buttonIsDown[index] = -1; buttonDownTime[index] = SunflowerWindow.Now; } if (mapping.ButtonIncrement.Contains(e.Button)) { int index = mapping.ButtonIncrement.ToList().IndexOf(e.Button); SunflowerWindow.Actors[index].Modulo++; buttonIsDown[index] = 1; buttonDownTime[index] = SunflowerWindow.Now; } if (mapping.ButtonMode.Contains(e.Button)) SunflowerWindow.Actors[mapping.ButtonMode.ToList().IndexOf(e.Button)].IsSorted = true; //if (mapping.ButtonReset.Contains(e.Button)) // SunflowerWindow.Reset(); }
private void Joystick_ButtonUp(object sender, JoystickButtonEventArgs e) { if (e.Button == mapping.ButtonBrake) // Trigger isBraking = false; if (e.Button == mapping.ButtonLimitRotation) // Grip isLimit = false; }
private void Joystick_ButtonUp(object sender, JoystickButtonEventArgs e) { if (mapping.ButtonDecrement.Contains(e.Button)) buttonIsDown[mapping.ButtonDecrement.ToList().IndexOf(e.Button)] = 0; if (mapping.ButtonIncrement.Contains(e.Button)) buttonIsDown[mapping.ButtonIncrement.ToList().IndexOf(e.Button)] = 0; if (mapping.ButtonMode.Contains(e.Button)) SunflowerWindow.Actors[mapping.ButtonMode.ToList().IndexOf(e.Button)].IsSorted = false; }