using grabbed mode
This commit is contained in:
parent
47200a16c7
commit
7aa6e52e4b
|
@ -116,6 +116,7 @@ public class MouseTest {
|
||||||
Display.setFullscreen(FULLSCREEN);
|
Display.setFullscreen(FULLSCREEN);
|
||||||
Display.setVSyncEnabled(true);
|
Display.setVSyncEnabled(true);
|
||||||
Display.create();
|
Display.create();
|
||||||
|
Mouse.setGrabbed(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
|
@ -187,8 +188,6 @@ public class MouseTest {
|
||||||
handleKeyboard();
|
handleKeyboard();
|
||||||
handleMouse();
|
handleMouse();
|
||||||
|
|
||||||
System.out.println(Mouse.getX() + ", " + Mouse.getY());
|
|
||||||
|
|
||||||
// pause and continue if minimized
|
// pause and continue if minimized
|
||||||
if(!Display.isVisible()) {
|
if(!Display.isVisible()) {
|
||||||
if(Display.isDirty()) {
|
if(Display.isDirty()) {
|
||||||
|
|
Loading…
Reference in New Issue