NikolaiResokav/LoveFrames — pull request #73 by randrews (2013-07-18 23:54:53+00:00)
Title: Skin changes

Here are the changes we've been talking about. This makes some internal changes to the default skin and a change to how skins are loaded. The result is you can now make a skin that overrides just the parts you want to change, while still using the default skin for everything else.

There are two ways in which they might break existing code:

- object:GetSkin() now returns the actual skin, instead of the name of the skin, and if there's no skin set it will return the active or default one. The idea being, whatever GetSkin returns is the actual skin this object will be rendered with.

- Custom skins will require slight changes. Skins are now responsible for loading their own images; there's an OnRegister hook that gets called. So if they want the same image loading behavior as before, the easiest way is to use the default skin's OnRegister hook:

```lua
my_skin.OnRegister = loveframes.skins.available["Blue"].OnRegister
```

Let me know what you think!