my github
english | espaƱol

Example For Touchscreen Dpad Using Libgdx

Hello! Now that you had a lot of time to play with the code i wrote on my previous post, here's an example Eclipse project that uses that same code of my class GameDPad for you to test and use as reference. (Well it is not the SAME code, because the first one used the fourth quadrant of the cartesian coordinate system, and this one uses the first quadrant.)

Why the change you ask? Well, the first time i was using the Canvas API where the origin is at the top left corner, and this example uses the Libgdx Framework which starts with the origin at the bottom left corner.

Note that it really is basic stuff, and maybe it's not the best implementation but it works nice enough, although i intentionally left some gaps for you to fill. I'm sorry if you expect me to write down EVERYTHING you need, but i'm the kind of person that thinks that you will learn more by yourself than having it all done and analyzing it later.

Download DPadTest project

If you have any questions, suggestions or better code to share, comments are below. :)