LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: jediTofu on December 02, 2010, 21:27:13

Title: How to use switches?
Post by: jediTofu on December 02, 2010, 21:27:13
I've tried both this:

System.setProperty("org.lwjgl.input.Mouse.allowNegativeMouseCoords","true");

And this in JVM args:

-Dorg.lwjgl.input.Mouse.allowNegativeMouseCoords=true

Neither worked.  How do I set this?
Title: Re: How to use switches?
Post by: jediTofu on December 03, 2010, 20:46:14
I'd really like negative mouse coords...any help ???
I thought that this was a noobie question, but no one has responded...
Title: Re: How to use switches?
Post by: kappa on December 03, 2010, 21:10:41
both the methods you mention in your first post are the correct ways to do it.

I'm not sure why it doesn't work but do remember its only for mouse positions while your dragging and not for general movement outside the window.
Title: Re: How to use switches?
Post by: jediTofu on December 03, 2010, 21:24:47
Quote from: kappa on December 03, 2010, 21:10:41
...only for mouse positions while your dragging...

Aw, that's lame :(  I guess that I could just make it where you have to drag.

Could this be implemented in the next version (and possibly with a set function instead)?  I guess I should have put this in the RFE forum...  I think that some rather unique games could use this.  If sounds unnecessary, no big deal then  :P.
Title: Re: How to use switches?
Post by: kappa on December 03, 2010, 21:33:32
hmm, so you want to get the global position of the mouse on the screen rather then the LWJGL Display?

pretty easy to do just use the following methods:

int mouseX = java.awt.MouseInfo.getLocation().x;
int mouseY = java.awt.MouseInfo.getLocation().y;

or alternatively you can use JInput to get mouse movement anywhere on the screen (yes even outside the Display).

Title: Re: How to use switches?
Post by: jediTofu on December 04, 2010, 00:08:34
well, I was just hoping I could use the Mouse class....but I will just use JInput more directly then.