Creating new widgets
It has been a long journey since you learned the basics of Scene2D, so you are now prepared for the fun part consisting of extending the library and generating your own content for personal projects or even for the community itself. With proper usage of the Skin
class, you can perform a complete overhaul of your UI just by changing image assets. As you will know, software reuse becomes a booster in development companies so that you will not have to reinvent the wheel.
In this direction, you can easily create new widgets composed of simpler ones. Usually, the easiest way of approaching this is by extending a Table
class and organizing inner widgets within it, but do not discard extending from WidgetGroup
and using composition ...
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.