Fix HWCursorTest
This commit is contained in:
parent
662e9c7e7a
commit
861421e16c
|
@ -276,6 +276,7 @@ public class HWCursorTest {
|
||||||
int button = Mouse.getEventButton();
|
int button = Mouse.getEventButton();
|
||||||
if(button >= 0 && button < 3 && Mouse.getEventButtonState()) {
|
if(button >= 0 && button < 3 && Mouse.getEventButtonState()) {
|
||||||
mouse_btn = Mouse.getEventButton();
|
mouse_btn = Mouse.getEventButton();
|
||||||
|
switchCursor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,11 +338,7 @@ public class HWCursorTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Keyboard.isKeyDown(Keyboard.KEY_N)) {
|
if (Keyboard.isKeyDown(Keyboard.KEY_N)) {
|
||||||
try {
|
switchCursor();
|
||||||
Mouse.setNativeCursor(cursor[mouse_btn]);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while(Keyboard.next()) {
|
while(Keyboard.next()) {
|
||||||
|
@ -351,6 +348,14 @@ public class HWCursorTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void switchCursor() {
|
||||||
|
try {
|
||||||
|
Mouse.setNativeCursor(cursor[mouse_btn]);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleans up the test
|
* Cleans up the test
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue