@Override public String toString(){ return "Joystick[name=" + name + ", id=" + joyId + ", buttons=" + getButtonCount() + ", axes=" + getAxisCount() + "]"; } }
/** * Assign the mapping name to receive events from the given button index * on the joystick. * * @param mappingName The mapping to receive joystick button events. * @param buttonId The button index. * * @see Joystick#getButtonCount() * @deprecated Use JoystickButton.assignButton() instead. */ @Override public void assignButton(String mappingName, int buttonId){ if (buttonId < 0 || buttonId >= getButtonCount()) throw new IllegalArgumentException(); inputManager.addMapping(mappingName, new JoyButtonTrigger(joyId, buttonId)); }
@Override public String toString(){ return "Joystick[name=" + name + ", id=" + joyId + ", buttons=" + getButtonCount() + ", axes=" + getAxisCount() + "]"; } }
/** * Assign the mapping name to receive events from the given button index * on the joystick. * * @param mappingName The mapping to receive joystick button events. * @param buttonId The button index. * * @see Joystick#getButtonCount() * @deprecated Use JoystickButton.assignButton() instead. */ @Override public void assignButton(String mappingName, int buttonId){ if (buttonId < 0 || buttonId >= getButtonCount()) throw new IllegalArgumentException(); inputManager.addMapping(mappingName, new JoyButtonTrigger(joyId, buttonId)); }