aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorendolf <[email protected]>2007-06-28 20:37:24 +0000
committerendolf <[email protected]>2007-06-28 20:37:24 +0000
commit56e0e6811b57f4628810b47122ce302e3da4094b (patch)
tree19a2b4b1146c92b43c9922a3ca3d49980a68df1a /plugins
parent8f42349adc3e5dd4998ad120c72386808c30be09 (diff)
Make the API docs and the code match for the Mouse.get<button> methods. Add the methods that we actually wanted to be there.
git-svn-id: file:///home/sven/projects/JOGL/git-svn/svn-server-sync/jinput/trunk@189 e343933a-64c8-49c5-92b1-88f2ce3e89e8
Diffstat (limited to 'plugins')
-rwxr-xr-xplugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java2
-rw-r--r--plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java2
-rw-r--r--plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java2
-rw-r--r--plugins/windows/src/java/net/java/games/input/RawMouse.java6
4 files changed, 6 insertions, 6 deletions
diff --git a/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java b/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java
index 9ba03a1..cc9289b 100755
--- a/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java
+++ b/plugins/OSX/src/java/net/java/games/input/OSXEnvironmentPlugin.java
@@ -191,7 +191,7 @@ public final class OSXEnvironmentPlugin extends ControllerEnvironment implements
Component[] components_array = new Component[components.size()];
components.toArray(components_array);
Mouse mouse = new OSXMouse(device, queue, components_array, new Controller[]{}, new Rumbler[]{});
- if (mouse.getLeft() != null && mouse.getX() != null && mouse.getY() != null) {
+ if (mouse.getPrimaryButton() != null && mouse.getX() != null && mouse.getY() != null) {
return mouse;
} else {
queue.release();
diff --git a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java
index 1ad937a..7b90cab 100644
--- a/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java
+++ b/plugins/linux/src/java/net/java/games/input/LinuxEnvironmentPlugin.java
@@ -193,7 +193,7 @@ public final class LinuxEnvironmentPlugin extends ControllerEnvironment implemen
private final static Mouse createMouseFromDevice(LinuxEventDevice device, Component[] components) throws IOException {
Mouse mouse = new LinuxMouse(device, components, new Controller[]{}, device.getRumblers());
- if (mouse.getX() != null && mouse.getY() != null && mouse.getLeft() != null)
+ if (mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null)
return mouse;
else
return null;
diff --git a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
index be452bc..5e31bad 100644
--- a/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
+++ b/plugins/windows/src/java/net/java/games/input/DirectInputEnvironmentPlugin.java
@@ -166,7 +166,7 @@ public final class DirectInputEnvironmentPlugin extends ControllerEnvironment im
private final Mouse createMouseFromDevice(IDirectInputDevice device) {
Component[] components = createComponents(device, true);
Mouse mouse = new DIMouse(device, components, new Controller[]{}, device.getRumblers());
- if (mouse.getX() != null && mouse.getY() != null && mouse.getLeft() != null)
+ if (mouse.getX() != null && mouse.getY() != null && mouse.getPrimaryButton() != null)
return mouse;
else
return null;
diff --git a/plugins/windows/src/java/net/java/games/input/RawMouse.java b/plugins/windows/src/java/net/java/games/input/RawMouse.java
index e6fc324..57b6cc0 100644
--- a/plugins/windows/src/java/net/java/games/input/RawMouse.java
+++ b/plugins/windows/src/java/net/java/games/input/RawMouse.java
@@ -128,17 +128,17 @@ final class RawMouse extends Mouse {
break;
case EVENT_BUTTON_0:
event_state = EVENT_BUTTON_1;
- if (makeButtonEvent(current_event, event, getLeft(), RawDevice.RI_MOUSE_BUTTON_1_DOWN, RawDevice.RI_MOUSE_BUTTON_1_UP))
+ if (makeButtonEvent(current_event, event, getPrimaryButton(), RawDevice.RI_MOUSE_BUTTON_1_DOWN, RawDevice.RI_MOUSE_BUTTON_1_UP))
return true;
break;
case EVENT_BUTTON_1:
event_state = EVENT_BUTTON_2;
- if (makeButtonEvent(current_event, event, getRight(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP))
+ if (makeButtonEvent(current_event, event, getSecondaryButton(), RawDevice.RI_MOUSE_BUTTON_2_DOWN, RawDevice.RI_MOUSE_BUTTON_2_UP))
return true;
break;
case EVENT_BUTTON_2:
event_state = EVENT_BUTTON_3;
- if (makeButtonEvent(current_event, event, getMiddle(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP))
+ if (makeButtonEvent(current_event, event, getTertiaryButton(), RawDevice.RI_MOUSE_BUTTON_3_DOWN, RawDevice.RI_MOUSE_BUTTON_3_UP))
return true;
break;
case EVENT_BUTTON_3: