Package com.limelight.input.gamepad.GamepadMapping

Examples of com.limelight.input.gamepad.GamepadMapping.Mapping


  }

  public void handleButton(Device device, int buttonId, boolean pressed) {
    GamepadMapping mapping = GamepadSettingsManager.getSettings();

    Mapping mapped = mapping.get(new SourceComponent(Type.BUTTON, buttonId, null));
    if (mapped == null) {
      //LimeLog.info("Unmapped button pressed: " + buttonId);
      return;
    }
View Full Code Here


      }
    } else {
      mappedDir = newValue > 0 ? Direction.POSITIVE : Direction.NEGATIVE;
    }
   
    Mapping mapped = mapping.get(new SourceComponent(Type.AXIS, axisId, mappedDir));
    if (mapped == null) {
      //LimeLog.info("Unmapped axis moved: " + axisId);
      return;
    }
    float value =  sanitizeValue(mapped, newValue);
View Full Code Here

    GamepadComponent[] components = GamepadComponent.values();

    for (int i = 0; i < components.length; i++) {

      Mapping mapping = config.get(components[i]);
      if (mapping == null) {
        mapping = config.new Mapping(components[i], false, false);
      }
      Box componentBox = createComponentBox(mapping);

      mainPanel.add(componentBox);
View Full Code Here

  private ActionListener createCheckboxListener() {
    return new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        JCheckBox clicked = (JCheckBox)e.getSource();
        GamepadComponent padComp = GamepadComponent.valueOf(clicked.getName());
        Mapping currentMapping = config.get(padComp);
        if (currentMapping == null) {
          //this makes more semantic sense to me than using !=
          clicked.setSelected(!(clicked.isSelected()));
        } else {
          ((GamepadCheckBox)clicked).setValue(currentMapping, clicked.isSelected());
View Full Code Here

  private void map(final Box toMap) {
    if (mappingThread == null || !mappingThread.isAlive()) {

      //a little janky, could probably be fixed up a bit
      final JButton buttonPressed = getButton(toMap);
      final Mapping mappingToMap = componentMap.get(toMap);

      buttonPressed.setSelected(true);

      buttonPressed.setText("Select Input");
View Full Code Here

          buttonPressed.setSelected(false);
          return;
        }
      }

      Mapping oldConfig = config.get(newMapping);
      if (oldConfig != null) {
        getButton(getBox(oldConfig)).setText("");
      }

      SourceComponent oldSource = config.getMapping(mappingToMap.padComp);
View Full Code Here

TOP

Related Classes of com.limelight.input.gamepad.GamepadMapping.Mapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.