Changes to Actor

We changed the visibility of input methods of Actors. They are all public now instead of protected. enjoy 😀

Update: i’m still adjusting to the new environment, so please excuse me if i’m not that responsive on the usual channels. Give me a week or so and things should get back to normal. It’s quite a change for me 🙂

More new stuff for libgdx!

Mr. Thotep asked for mouse capturing and cursor invisibility. I added that today (besides a few other additions and fixes). Here’s how the new methods in Input look like:

The first method will make the cursor invisible on the desktop and make sure the mouse can’t leave the window. It works perfectly fine with the Lwjgl backend. For the Jogl backend i had to emulate this behaviour with Robot. Sadly, it will not work 100% if the mouse speeds are to fast: the mouse can escape the window in that case.

The second method’s function should be obvious. The third method allows you to position the mouse cursor within the window. That can come in handy for first person shooters where you usually center the mouse cursor in your window and only operate on deltas. But how to get the deltas? Looky:

Simple, eh? With all those nice additions we are nearing the 1.0 release with big steps. The last bits missing are the UI stuff i talked about earlier which i’ll try to integrate over the weekend, as well as finishing off the 3D API, which is also in a pretty good shape already.

Note: the cursor related methods in Input will of course only work on the desktop. The delta methods work on all backends! Finally, Gdx Remote needs an overhaul i don’t have time for at the moment to also implement the above methods. I’ll do that eventually, just not now. And the Angle backend also needs some love. Both things are recorded as issues on the tracker so i don’t forget them.

UI stuff tomorrow or on sunday if all goes well. Release of 0.9.2 with all the new stuff plus fixes on sunday 🙂 Use the nightlies for now.

Also, a shout-out to MatthiasM over at the #lwjgl channel for fixing a bug in Lwjgl we discovered today. I could have submitted a patch as well, but i was to lazy 😀 He’s also the guy that provides us with the awesome TWL UI library, go check it out (supported in libgdx!).

Fixes in Multitouch Code

So, i think we might have figured out what’s wrong. According to our most helpful BurningHand on the forums the problem is reproduceable now and seems to be related to pause/resume and spurious up/drag events. I fixed this in the code. While no exception will be thrown anymore (that was in there before for debugging purposes) you will still get LogCat output should the problem turn up again. And it will, but it won’t crash your up nor fuck up your input events. Fetch the latest nightlies and give it a try.