Newbie Question : LWJGL Mouse Support

Hi all,

I’ve just started playing around with LWJGL…
and I was wondering if the experts here can point
me to the right direction on mouse support…

As far as I can tell… There are none.

Also, all of the LWJGL example code I’ve found
are for LWJGL 0.5 Is there some tutorials which
support LWJGL 0.6??

Thanks for you time

[quote] As far as I can tell… There are none.
[/quote]
It’s not that the mouse is hidden!
take a look at org.lwjgl.input.Mouse
and then org.lwjgl.test.input.MouseTest

this should get you started

[quote]Also, all of the LWJGL example code I’ve found
are for LWJGL 0.5 Is there some tutorials which
support LWJGL 0.6??
[/quote]
The example code in the source drop should “work” fine. However the tutorial on site does not.
Most of the documentation issues will be fixed for the 0.7 release, while 0.8 will include even more documentation, tutorials and articles. Stay tuned.

And if you miss a visible native cursor, you will like version 0.7.

  • elias

Hmm…
Correct me if I’m wrong.
But the input.Mouse object just returns the
offset of the current click and the last click…

Also, it lacks any mouse over support.
and ya… having a cursor would sure be nice :slight_smile:

Is there a ETA on next version??
Is there gonna be a huge framework change like
the one from 0.5 to 0.6 ??

I’m reluctent to get too commited to LWJGL due to
the fear that they’re gonna make huge changes to
design from version to version.

Also, is there a way to embbed the LWJGL canvas
to a java windowed component? That way I can
manally take care of the mouse movement and clicks?

Thanks for the replys

The whole idea behind the mouse is that you create one yourself - you decide where it should be and how to interprate the mouse movement offsets. Then depending on what you need, you can draw your own cursor if needed - the mouse test examples do exactly this, by keeping track of the mouse position and drawing a shape at the current location.

Not sure what you mean by mouse over support, but it sounds like you’re missing the point of the API - to provide a low level, console like interface, not to intergrate with every known windowing toolkit. If you really need a windowing toolkit, either write your own or use the newly made avalible Jogl - I’m trying to experiment with Jogl at the moment, but the early version seems very rough around the edges.

[quote] Is there a ETA on next version??
Is there gonna be a huge framework change like
the one from 0.5 to 0.6 ??
[/quote]
No ETA, but “soon” - we’re working on it right now.

We WILL make changes untill we reach 1.0, thats just how it’s going to be. That said, the refactoring is pretty limited, and usually of the boring mindnumbing type ;D

We refactor stuff from time to time (again, untill we get to 1.0) to make it a lean mean gaming machine :slight_smile: