private void SetupButtons(string button_a, string button_b, string button_x, string button_y) { buttonA = new JoystickButton(this, button_a, ButtonCode.A); buttonB = new JoystickButton(this, button_b, ButtonCode.B); buttonX = new JoystickButton(this, button_x, ButtonCode.X); buttonY = new JoystickButton(this, button_y, ButtonCode.Y); }
private void ButtonUpdate(JoystickButton button) { if (button.GetButton()) { if (!button.IsHeld) { buttonInput.OnButtonPressed(button.Code); button.IsHeld = true; } buttonInput.OnButtonHeld(button.Code); } else { if (button.IsHeld) { buttonInput.OnButtonReleased(button.Code); } button.IsHeld = false; } }
private void SetupBumpers(string left_bumper, string right_bumper) { buttonLeftBumper = new JoystickButton(this, left_bumper, ButtonCode.LeftBumper); buttonRightBumper = new JoystickButton(this, right_bumper, ButtonCode.RightBumper); }
private void SetupMenusButtons(string button_start, string button_back) { buttonStart = new JoystickButton(this, button_start, ButtonCode.Start); buttonBack = new JoystickButton(this, button_back, ButtonCode.Back); }
private void SetupStickButtons(string button_left_stick, string button_right_stick) { buttonLeftStick = new JoystickButton(this, button_left_stick, ButtonCode.LeftStick); buttonRightStick = new JoystickButton(this, button_right_stick, ButtonCode.RightStick); }