From 0cfa6c5c21425c87ab69e905ee2109d4c0594e65 Mon Sep 17 00:00:00 2001 From: BenG49 <64862590+BenG49@users.noreply.github.com> Date: Sun, 18 Feb 2024 22:39:16 -0500 Subject: [PATCH] Rename Gamepad select to alt-left and start to alt-right (#85) * Rename select to alt-left and start to alt-right * Rename to left menu and right menu --- src/com/stuypulse/stuylib/input/Gamepad.java | 30 +++++++++---------- .../stuylib/input/gamepads/AutoGamepad.java | 10 +++---- .../stuylib/input/gamepads/Logitech.java | 6 ++-- .../stuypulse/stuylib/input/gamepads/PS4.java | 6 ++-- .../stuylib/input/gamepads/Xbox.java | 6 ++-- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/com/stuypulse/stuylib/input/Gamepad.java b/src/com/stuypulse/stuylib/input/Gamepad.java index 7b91368d..2bbbfb25 100644 --- a/src/com/stuypulse/stuylib/input/Gamepad.java +++ b/src/com/stuypulse/stuylib/input/Gamepad.java @@ -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; } @@ -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 // @@ -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 -> {}); diff --git a/src/com/stuypulse/stuylib/input/gamepads/AutoGamepad.java b/src/com/stuypulse/stuylib/input/gamepads/AutoGamepad.java index b6d370bd..737cfed0 100644 --- a/src/com/stuypulse/stuylib/input/gamepads/AutoGamepad.java +++ b/src/com/stuypulse/stuylib/input/gamepads/AutoGamepad.java @@ -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 // diff --git a/src/com/stuypulse/stuylib/input/gamepads/Logitech.java b/src/com/stuypulse/stuylib/input/gamepads/Logitech.java index 454e95ec..2eb55f22 100644 --- a/src/com/stuypulse/stuylib/input/gamepads/Logitech.java +++ b/src/com/stuypulse/stuylib/input/gamepads/Logitech.java @@ -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); } diff --git a/src/com/stuypulse/stuylib/input/gamepads/PS4.java b/src/com/stuypulse/stuylib/input/gamepads/PS4.java index 5296a977..47bc80f0 100644 --- a/src/com/stuypulse/stuylib/input/gamepads/PS4.java +++ b/src/com/stuypulse/stuylib/input/gamepads/PS4.java @@ -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); } diff --git a/src/com/stuypulse/stuylib/input/gamepads/Xbox.java b/src/com/stuypulse/stuylib/input/gamepads/Xbox.java index 42a2abaf..e6a7ad07 100644 --- a/src/com/stuypulse/stuylib/input/gamepads/Xbox.java +++ b/src/com/stuypulse/stuylib/input/gamepads/Xbox.java @@ -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(); }