Fix HWCursorTest

This commit is contained in:
Elias Naur 2007-01-02 11:09:05 +00:00
parent 662e9c7e7a
commit 861421e16c
1 changed files with 11 additions and 6 deletions

View File

@ -276,6 +276,7 @@ public class HWCursorTest {
int button = Mouse.getEventButton();
if(button >= 0 && button < 3 && Mouse.getEventButtonState()) {
mouse_btn = Mouse.getEventButton();
switchCursor();
}
}
}
@ -337,11 +338,7 @@ public class HWCursorTest {
}
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 @@ public class HWCursorTest {
}
}
}
private void switchCursor() {
try {
Mouse.setNativeCursor(cursor[mouse_btn]);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Cleans up the test
*/