Chapter 8. User Interfaces with Scene2D

In this chapter, we will cover the following recipes:

  • Introducing the Scene2D API
  • Widget collection overview
  • Creating a basic menu screen using tables
  • Skin customization
  • Creating new widgets

Introduction

User interface refers to the methods and components through which a user will interact with your application, which may or may not be a game. To make your life easier, Libgdx provides you with a built-in variety of widgets and structural components you can use to create a scene graph, commonly known as Scene2D.

Note

A scene graph is basically a data structure to hierarchically organize the content of a scene. This implies that changes in parent nodes will be reflected on their children too.

Get Libgdx Cross-platform Game Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.