Skin customization
Your current progress on the Scene2D topic allows you to develop a simple UI application without investing a huge effort. However, if you intend to program a more complex game with lots of UI shared assets, you will easily get yourself into a mess.
Skins are the wonderful solution to pack all your UI data into one simple JSON file adding to the aforementioned advantages of using an atlas.
As tends to happen with the data-driven approach, it requires an initial effort that turns into awesome commodities and facilities for the future.
Getting ready
The code for this recipe can be found in the SkinCustomizationSample
class within the samples-core
project. Please do not forget to visit it in order to run and play with the live example. ...
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.