Page-based user interface
In the previous chapter, we developed a game that contained a single page. Most of the modern mobile games, however, contain sophisticated user interfaces backed by complex business logic. A typical user interface consists of several full-screen pages with multiple UI elements, such as buttons, images and, input boxes. These are rendered using the in-game rendering system, and do not depend on the user interface of the underlying operating system. In this recipe, we show you how to approach this problem.
Getting ready
You might want to find out what open source C++ multiplatform UI libraries exist out there. The following link will help you: http://en.wikipedia.org/wiki/List_of_platform-independent_GUI_libraries.
We would also like to recommend looking at libRocket if you want to go for a full-scale HTML/CSS user interface for your game (http://librocket.com). Its integration is straightforward, but lies outside of the scope of this book.
How to do it...
A single page...