mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-05 15:36:10 +00:00
more controller stuff
-new controller listener to be a singleton thread that listens for controller input even when not streaming, then sends input when streaming.\ -main frame will stop controller listener when closing -gamepads should now use the gamepad config settings (WIP)
This commit is contained in:
@@ -4,21 +4,23 @@ 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");
|
||||
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),
|
||||
LS_THUMB("Left Stick Button", false), RS_THUMB("Right Stick Button", false),
|
||||
LT("Left Trigger", true), RT("Right Trigger", true), LB("Left Bumper", false), RB("Right Bumper", false),
|
||||
BTN_START("Start Button", false), BTN_BACK("Back Button", false), BTN_SPECIAL("Special Button", false);
|
||||
|
||||
private JLabel label;
|
||||
private JTextField textBox;
|
||||
private boolean analog;
|
||||
|
||||
private ControllerComponent(String name) {
|
||||
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.analog = analog;
|
||||
}
|
||||
|
||||
public JLabel getLabel() {
|
||||
@@ -28,4 +30,8 @@ public enum ControllerComponent {
|
||||
public JTextField getTextField() {
|
||||
return textBox;
|
||||
}
|
||||
|
||||
public boolean isAnalog() {
|
||||
return analog;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user