Work in progress: fixing gamepad to work on all OSs and be customizable

This commit is contained in:
Diego Waxemberg
2013-12-19 17:31:14 -05:00
parent 99a2a53163
commit 2ef77aae4a
5 changed files with 180 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package com.limelight.input;
import javax.swing.JLabel;
import javax.swing.JTextField;
public enum ControllerComponent {
BTN_A("Button 1 (A)"), BTN_X("Button 2 (X)"), BTN_Y("Button 3 (Y)"), BTN_B("Button 4 (B)"),
DPAD_UP("D-pad Up"), DPAD_DOWN("D-pad Down"), DPAD_LEFT("D-pad Left"), DPAD_RIGHT("D-pad Right"),
LS_X("Left Stick X"), LS_Y("Left Stick X"), RS_X("Right Stick X"), RS_Y("Left Stick Y"),
LS_THUMB("Left Stick Button"), RS_THUMB("Right Stick Button"),
LT("Left Trigger"), RT("Right Trigger"), LB("Left Bumper"), RB("Right Bumper"),
BTN_START("Start Button"), BTN_BACK("Back Button"), BTN_SPECIAL("Special Button");
private JLabel label;
private JTextField textBox;
private ControllerComponent(String name) {
this.label = new JLabel(name);
this.textBox = new JTextField();
this.textBox.setEditable(false);
this.textBox.setName(this.name());
}
public JLabel getLabel() {
return label;
}
public JTextField getTextField() {
return textBox;
}
}