Skip to content

Commit

Permalink
Rename Gamepad select to alt-left and start to alt-right (#85)
Browse files Browse the repository at this point in the history
* Rename select to alt-left and start to alt-right

* Rename to left menu and right menu
  • Loading branch information
BenG49 authored Feb 19, 2024
1 parent 9973c08 commit 0cfa6c5
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
30 changes: 15 additions & 15 deletions src/com/stuypulse/stuylib/input/Gamepad.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ public boolean getRawRightButton() {
return false;
}

// Start / Select / Option //
/** @return If the select button is pressed */
public boolean getRawSelectButton() {
// Left Menu / Right Menu //
/** @return If the left menu button is pressed */
public boolean getRawLeftMenuButton() {
return false;
}

/** @return If the start button is pressed */
public boolean getRawStartButton() {
/** @return If the right menu button is pressed */
public boolean getRawRightMenuButton() {
return false;
}

Expand Down Expand Up @@ -334,15 +334,15 @@ public final Trigger getRightButton() {
return new Trigger(this::getRawRightButton);
}

// Select / Start / Option //
/** @return Trigger that activates with {@link #getRawSelectButton()} */
public final Trigger getSelectButton() {
return new Trigger(this::getRawSelectButton);
// Left Menu / Right Menu //
/** @return Trigger that activates with {@link #getRawLeftMenuButton()} */
public final Trigger getLeftMenuButton() {
return new Trigger(this::getRawLeftMenuButton);
}

/** @return Trigger that activates with {@link #getRawStartButton()} */
public final Trigger getStartButton() {
return new Trigger(this::getRawStartButton);
/** @return Trigger that activates with {@link #getRawRightMenuButton()} */
public final Trigger getRightMenuButton() {
return new Trigger(this::getRawRightMenuButton);
}

// Analog Stick Triggers //
Expand Down Expand Up @@ -393,9 +393,9 @@ public final void initSendable(SendableBuilder builder) {
builder.addBooleanProperty("Face Button Left", this::getRawLeftButton, x -> {});
builder.addBooleanProperty("Face Button Right", this::getRawRightButton, x -> {});

// Start / Select / Option
builder.addBooleanProperty("Button Select", this::getRawSelectButton, x -> {});
builder.addBooleanProperty("Button Start", this::getRawStartButton, x -> {});
// Left Menu / Right Menu //
builder.addBooleanProperty("Button Left Menu", this::getRawLeftMenuButton, x -> {});
builder.addBooleanProperty("Button Right Menu", this::getRawRightMenuButton, x -> {});

// Analog Stick Buttons
builder.addBooleanProperty("Left Stick Button", this::getRawLeftStickButton, x -> {});
Expand Down
10 changes: 5 additions & 5 deletions src/com/stuypulse/stuylib/input/gamepads/AutoGamepad.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ public boolean getRawTopButton() {
return getDetectedGamepad().getRawTopButton();
}

// Start / Select //
public boolean getRawSelectButton() {
return getDetectedGamepad().getRawSelectButton();
// Left Menu / Right Menu //
public boolean getRawLeftMenuButton() {
return getDetectedGamepad().getRawLeftMenuButton();
}

public boolean getRawStartButton() {
return getDetectedGamepad().getRawStartButton();
public boolean getRawRightMenuButton() {
return getDetectedGamepad().getRawRightMenuButton();
}

// Analog Stick Buttons //
Expand Down
6 changes: 3 additions & 3 deletions src/com/stuypulse/stuylib/input/gamepads/Logitech.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ public boolean getRawTopButton() {
return getRawButton(4);
}

// Start / Select //
// Left Menu / Right Menu //
@Override
public boolean getRawSelectButton() {
public boolean getRawLeftMenuButton() {
return getRawButton(9);
}

@Override
public boolean getRawStartButton() {
public boolean getRawRightMenuButton() {
return getRawButton(10);
}

Expand Down
6 changes: 3 additions & 3 deletions src/com/stuypulse/stuylib/input/gamepads/PS4.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ public boolean getRawTopButton() {
return getRawButton(4);
}

// Start / Select //
// Left Menu / Right Menu //
@Override
public boolean getRawSelectButton() {
public boolean getRawLeftMenuButton() {
return getRawButton(9);
}

@Override
public boolean getRawStartButton() {
public boolean getRawRightMenuButton() {
return getRawButton(10);
}

Expand Down
6 changes: 3 additions & 3 deletions src/com/stuypulse/stuylib/input/gamepads/Xbox.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ public boolean getRawTopButton() {
return getJoystick().getYButton();
}

// Start / Select //
// Left Menu / Right Menu //
@Override
public boolean getRawSelectButton() {
public boolean getRawLeftMenuButton() {
return getJoystick().getBackButton();
}

@Override
public boolean getRawStartButton() {
public boolean getRawRightMenuButton() {
return getJoystick().getStartButton();
}

Expand Down

0 comments on commit 0cfa6c5

Please sign in to comment.