Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create skin for libgdx project?

Tags:

libgdx

skin

I looked at the default skin files from the test project. I don't understand why uiskin.png has a font images inside it. also the uiskin.atlas file contains split field that I don't understand why do I need it and how to use it.

Where can I find a guide to all of the things?

like image 984
Alex Kapustian Avatar asked Aug 04 '14 11:08

Alex Kapustian


2 Answers

It is probably a good starting point to read the Skin wiki article.

For more information there is the Skin API documentation and the Skin and SkinLoader source code.

A good starting point for a completely new skin might also be the raw default skin which you can find in the libgdx test assets. This can be packed via TexturePacker, because skins will only work with a texture atlas.

For a UI to easily create a Skin, someone has recently created an editor for that: gdx-skineditor.

like image 62
noone Avatar answered Nov 12 '22 09:11

noone


In addition to noone answer, you should know that there is a Scene2D extension that adds a new default skin and extra widgets: VisUI. It uses USL internally, which makes it easier to write Skin files than with "pure" JSON.

like image 21
Czyzby Avatar answered Nov 12 '22 08:11

Czyzby