Răsfoiți Sursa

JoyButtonTrigger: clarify that the constructor arg is not an axis ID (#1765)

Stephen Gold 3 ani în urmă
părinte
comite
ae27350eb0

+ 4 - 4
jme3-core/src/main/java/com/jme3/input/controls/JoyButtonTrigger.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2021 jMonkeyEngine
+ * Copyright (c) 2009-2022 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,11 +41,11 @@ public class JoyButtonTrigger implements Trigger {
      * Use {@link Joystick#assignButton(java.lang.String, int) } instead.
      *
      * @param joyId the ID of a joystick
-     * @param axisId the ID of a joystick axis
+     * @param buttonId the index of a joystick button
      */
-    public JoyButtonTrigger(int joyId, int axisId) {
+    public JoyButtonTrigger(int joyId, int buttonId) {
         this.joyId = joyId;
-        this.buttonId = axisId;
+        this.buttonId = buttonId;
     }
 
     public static int joyButtonHash(int joyId, int joyButton) {