0

I'm wondering how I can add support easily to traverse my scene2d menus (tables) with LibGDX using a joystick, gamepad or keyboard keys.

Does anyone know how it should be done?

RobotRock
  • 4,211
  • 6
  • 46
  • 86
  • A ScrollPane that you move around while processing the input would be a great way to do it. – Ferdz Mar 13 '14 at 23:04

1 Answers1

1

You need to bring the concept of focus in your menu, rest is easy. (Just like old video games)

  1. Maintain a focus variable in your menu.
  2. Draw the menu-item in focus differently (Maybe an additional border).
  3. Handle key events properly to update value of focus.

Hope this helps.

Tanmay Patil
  • 6,882
  • 2
  • 25
  • 45