Slick Forums

Discuss the Slick 2D Library
It is currently Wed Aug 10, 2022 1:52 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed May 09, 2012 1:22 am 
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Earlier this evening, I implemented accelerometer support for Slick-AE after TheVapourRub asked whether it could be added. However, in bad practice, I pushed the implementation to development before posting it here.

This is the idea behind the implementation:
-A com.badlogic.gdx.Input field (with getters and setters) is added to the Slick-AE org.newdawn.slick.Input class, as well as the methods getAccelerometerX(), getAccelerometerY(), getAccelerometerZ(), getPitch(), and getRoll(). All of the new methods will return the corosponding com.badlogic.gdx.Input call returns from the new field, unless the new field is null.
-A line is added to the GDXContainer class immediately after the inputhandler is added to the libgdx input. This line sets the com.badlogic.gdx.Input field in the game container Input to the current application Input. (it hurts having 2 classes called input);

Since I carelessly pushed this to dev already, you can see the exact lines that were added for clarification. As with all Slick-AE changes, this does not effect the standard Slick library.

"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group