|
From: <eli...@us...> - 2007-01-02 11:09:08
|
Revision: 2710
http://svn.sourceforge.net/java-game-lib/?rev=2710&view=rev
Author: elias_naur
Date: 2007-01-02 03:09:05 -0800 (Tue, 02 Jan 2007)
Log Message:
-----------
Fix HWCursorTest
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java
Modified: trunk/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java 2007-01-02 10:55:44 UTC (rev 2709)
+++ trunk/LWJGL/src/java/org/lwjgl/test/input/HWCursorTest.java 2007-01-02 11:09:05 UTC (rev 2710)
@@ -276,6 +276,7 @@
int button = Mouse.getEventButton();
if(button >= 0 && button < 3 && Mouse.getEventButtonState()) {
mouse_btn = Mouse.getEventButton();
+ switchCursor();
}
}
}
@@ -337,11 +338,7 @@
}
if (Keyboard.isKeyDown(Keyboard.KEY_N)) {
- try {
- Mouse.setNativeCursor(cursor[mouse_btn]);
- } catch (Exception e) {
- e.printStackTrace();
- }
+ switchCursor();
}
while(Keyboard.next()) {
@@ -350,7 +347,15 @@
}
}
}
-
+
+ private void switchCursor() {
+ try {
+ Mouse.setNativeCursor(cursor[mouse_btn]);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
/**
* Cleans up the test
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|