From fdb42fbe6b454b2d656735ed5a87e828c0c7fce1 Mon Sep 17 00:00:00 2001 From: BenG49 Date: Sun, 18 Feb 2024 14:10:39 -0500 Subject: [PATCH 1/2] Rename select to alt-left and start to alt-right --- 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..e13d96fa 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() { + // Alt-Left / Alt-Right // + /** @return If the alt-left button is pressed */ + public boolean getRawAltLeftButton() { return false; } - /** @return If the start button is pressed */ - public boolean getRawStartButton() { + /** @return If the alt-right button is pressed */ + public boolean getRawAltRightButton() { 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); + // Alt-Left / Alt-Right // + /** @return Trigger that activates with {@link #getRawAltLeftButton()} */ + public final Trigger getAltLeftButton() { + return new Trigger(this::getRawAltLeftButton); } - /** @return Trigger that activates with {@link #getRawStartButton()} */ - public final Trigger getStartButton() { - return new Trigger(this::getRawStartButton); + /** @return Trigger that activates with {@link #getRawAltRightButton()} */ + public final Trigger getAltRightButton() { + return new Trigger(this::getRawAltRightButton); } // 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 -> {}); + // Alt-Left / Alt-Right // + builder.addBooleanProperty("Button Alt Left", this::getRawAltLeftButton, x -> {}); + builder.addBooleanProperty("Button Alt Right", this::getRawAltRightButton, 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..fdc9185c 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(); + // Alt-Left / Alt-Right // + public boolean getRawAltLeftButton() { + return getDetectedGamepad().getRawAltLeftButton(); } - public boolean getRawStartButton() { - return getDetectedGamepad().getRawStartButton(); + public boolean getRawAltRightButton() { + return getDetectedGamepad().getRawAltRightButton(); } // 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..4d1ee4d6 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 // + // Alt-Left / Alt-Right // @Override - public boolean getRawSelectButton() { + public boolean getRawAltLeftButton() { return getRawButton(9); } @Override - public boolean getRawStartButton() { + public boolean getRawAltRightButton() { 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..13e324a5 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 // + // Alt-Left / Alt-Right // @Override - public boolean getRawSelectButton() { + public boolean getRawAltLeftButton() { return getRawButton(9); } @Override - public boolean getRawStartButton() { + public boolean getRawAltRightButton() { 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..ff6b8833 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 // + // Alt-Left / Alt-Right // @Override - public boolean getRawSelectButton() { + public boolean getRawAltLeftButton() { return getJoystick().getBackButton(); } @Override - public boolean getRawStartButton() { + public boolean getRawAltRightButton() { return getJoystick().getStartButton(); } From d44c430a01d727d434777f370ec62c530ce756be Mon Sep 17 00:00:00 2001 From: BenG49 Date: Sun, 18 Feb 2024 22:18:01 -0500 Subject: [PATCH 2/2] 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 e13d96fa..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; } - // Alt-Left / Alt-Right // - /** @return If the alt-left button is pressed */ - public boolean getRawAltLeftButton() { + // Left Menu / Right Menu // + /** @return If the left menu button is pressed */ + public boolean getRawLeftMenuButton() { return false; } - /** @return If the alt-right button is pressed */ - public boolean getRawAltRightButton() { + /** @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); } - // Alt-Left / Alt-Right // - /** @return Trigger that activates with {@link #getRawAltLeftButton()} */ - public final Trigger getAltLeftButton() { - return new Trigger(this::getRawAltLeftButton); + // 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 #getRawAltRightButton()} */ - public final Trigger getAltRightButton() { - return new Trigger(this::getRawAltRightButton); + /** @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 -> {}); - // Alt-Left / Alt-Right // - builder.addBooleanProperty("Button Alt Left", this::getRawAltLeftButton, x -> {}); - builder.addBooleanProperty("Button Alt Right", this::getRawAltRightButton, 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 fdc9185c..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(); } - // Alt-Left / Alt-Right // - public boolean getRawAltLeftButton() { - return getDetectedGamepad().getRawAltLeftButton(); + // Left Menu / Right Menu // + public boolean getRawLeftMenuButton() { + return getDetectedGamepad().getRawLeftMenuButton(); } - public boolean getRawAltRightButton() { - return getDetectedGamepad().getRawAltRightButton(); + 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 4d1ee4d6..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); } - // Alt-Left / Alt-Right // + // Left Menu / Right Menu // @Override - public boolean getRawAltLeftButton() { + public boolean getRawLeftMenuButton() { return getRawButton(9); } @Override - public boolean getRawAltRightButton() { + 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 13e324a5..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); } - // Alt-Left / Alt-Right // + // Left Menu / Right Menu // @Override - public boolean getRawAltLeftButton() { + public boolean getRawLeftMenuButton() { return getRawButton(9); } @Override - public boolean getRawAltRightButton() { + 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 ff6b8833..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(); } - // Alt-Left / Alt-Right // + // Left Menu / Right Menu // @Override - public boolean getRawAltLeftButton() { + public boolean getRawLeftMenuButton() { return getJoystick().getBackButton(); } @Override - public boolean getRawAltRightButton() { + public boolean getRawRightMenuButton() { return getJoystick().getStartButton(); }