[libgdx] Implement touch controls android

Hi,

I’ve been trying to figure out how to implement the libgdx Touchpad so that I can implement touch controls on android, I got the starting point from here:

Seems straightforward enough; setup the skins, create the stage, and add the pad to the stage, then it’s just a matter of updating.

First, the organizational part…

So, when the game starts there’s a title screen, where there’s a stage to hold the buttons (new game, etc)… click new game and we dispose the title screen and load the new screen and the game hud with the controller.

I was thinking that each screen should be in its own class, then each stage with its own class that gets called when the appropriate screen is loaded… in otherwords the game starts loads newgamescreen, which creates newgameHUD class that creates the stage and populates it, then dispose of the HUD with the screen?

(I know, this first one is a bit of a noobish question, and I’m pretty sure I know the answer)

Next, among the options I was thinking of implementing, was like this one game I’ve played (can’t think of the name, sorry) but the idea is when you touch in the area of the movement controls that creates the start point where the “touchbackground” gets loaded with the knob at the spot where you touched, and then dragging moves the knob. In this way, no matter where you touch on the screen (within the bounds of the touchpad area) and the dragging is what gives the movement direction. Any ideas on how that might be implemented or articles pointing to how this technique might be accomplished?

Another idea I wanted to play with was to have a menuscreen where the player can customize the size of the actual touchpad to a size they would be comfortable with… if any of you have seen the snes emulator for android called “superretro16”, this one allows you to customize the size and positioning of all the buttons to replicate a snes controller… is this doable with stage2d / libgdx? any advice here?

Thanks.