O'Reilly logo

Learning Libgdx Game Development by Andreas Oehlke

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

Building the scene for the menu screen

We will now begin with the actual implementation of the scene for the menu screen. First, take a look at the following diagram that shows the hierarchy of the UI scene graph that we are going to build step-by-step:

Building the scene for the menu screen

The scene graph starts with an empty Stage. Then, the first child actor added to the stage is a Stack widget. A Stack widget allows you to add actors that can overlay other actors. We will make use of this ability to create several layers. Each layer uses a Table widget as its parent actor. Using stacked tables enables us to layout actors in an easy and logical way.

In the first step we will add the ...

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