mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-05 23:46:17 +00:00
more gamepad stuff
- now have settings files - now read/write gamepad settings to file - now map button/axis for gamepads
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package com.limelight.input;
|
||||
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JTextField;
|
||||
import java.io.Serializable;
|
||||
|
||||
public enum ControllerComponent {
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JLabel;
|
||||
|
||||
public enum ControllerComponent implements Serializable {
|
||||
BTN_A("Button 1 (A)", false), BTN_X("Button 2 (X)", false), BTN_Y("Button 3 (Y)", false), BTN_B("Button 4 (B)", false),
|
||||
DPAD_UP("D-pad Up", false), DPAD_DOWN("D-pad Down", false), DPAD_LEFT("D-pad Left", false), DPAD_RIGHT("D-pad Right", false),
|
||||
LS_X("Left Stick X", true), LS_Y("Left Stick X", true), RS_X("Right Stick X", true), RS_Y("Left Stick Y", true),
|
||||
@@ -12,14 +14,13 @@ public enum ControllerComponent {
|
||||
BTN_START("Start Button", false), BTN_BACK("Back Button", false), BTN_SPECIAL("Special Button", false);
|
||||
|
||||
private JLabel label;
|
||||
private JTextField textBox;
|
||||
private JButton mapButton;
|
||||
private boolean analog;
|
||||
|
||||
private ControllerComponent(String name, boolean analog) {
|
||||
this.label = new JLabel(name);
|
||||
this.textBox = new JTextField();
|
||||
this.textBox.setEditable(false);
|
||||
this.textBox.setName(this.name());
|
||||
this.mapButton = new JButton();
|
||||
this.mapButton.setName(this.name());
|
||||
this.analog = analog;
|
||||
}
|
||||
|
||||
@@ -27,8 +28,8 @@ public enum ControllerComponent {
|
||||
return label;
|
||||
}
|
||||
|
||||
public JTextField getTextField() {
|
||||
return textBox;
|
||||
public JButton getMapButton() {
|
||||
return mapButton;
|
||||
}
|
||||
|
||||
public boolean isAnalog() {
|
||||
|
||||
Reference in New Issue
Block a user