Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jul 07, 2022 12:53 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed May 09, 2012 1:22 am 
Offline
Oldbie
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"


Top
 Profile  
 
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:  
cron
Powered by phpBB® Forum Software © phpBB Group