O'Reilly logo

LibGDX Game Development Essentials by Juwal Bose

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Scene 2 – the Menu

Our game is almost complete but there is no menu scene. LibGDX provides Scene2D to create menus and the UI. We will use it to create our menu and loading scenes. We will do the following in this chapter:

  • Explore Scene2D
  • Learn how to use the Actor, Group, and Action classes
  • Learn how to use the Stage class
  • Create our menu scene
  • Integrate a standard loading scene
  • Learn how to handle Android's back and menu buttons
  • Learn how to create a Nine Patch image
  • Explore the layout options in Scene2D

The source files for this chapter can be found in chapter5.zip provided along with the book. You can open it up as a reference while you proceed through the chapter.

Introducing Scene2D

Scene2D is a 2D scene graph that helps you create UIs and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required