skin fonts

Quick update, a few important changes to scene2d.ui, for those brave enough to use it before it has solidified.

1) BitmapFonts are now described as:

Instead of the old way:

This makes the internal of the skin JSON loading simpler and more powerful. If a JSON value is a string where normally an object is expected, it is interpreted as a reference to a resource.

2) There is now an OrderedMap and the Json class uses it, so order from your JSON is preserved. The order of the resources in the skin JSON is important. Eg, TextureRegions should be before BitmapFonts because BitmapFont will use a TextureRegion with the same name, allowing the font to be packed in the skin texture.

3) Button used to have setText and try to manage a Label if it didn’t already have one. Now a Button is just a table with an optional background region or nine patch with 3 states: up, down, and checked. There is now TextButton that is a Button with a Label, and ImageButton that is a button with an Image.

5 thoughts on “skin fonts

Leave a Reply

Your email address will not be published.