skin packer

The Skin class is very convenient to apply skins to GUIs, but the backing texture is manually packed and if changed, the skin JSON has to be rewritten. We now have a class called SkinPacker that takes a directory of individual images and packs them on a single image. It also looks at the top and left edges of each image before packing. If it finds magenta pixels, it uses them as the split points for a nine patch. If it doesn’t find any, it uses the whole image as a region. The tool outputs the JSON for the skin with all the proper coordinates for the packed images.