
I was a little bit bored tonight so I decided to write a little guide about skinning an addon that you love to match Tukui. I'll take Recount as an example in this guide, because it's almost complete and introduced into t14 version. First of all, I'll explain the good and the bad way of doing it. The bad wayI know that currently a lot of users make skin directly by editing Lua files into the original addons and upload the new versions with our upload service. This is bad, really bad. Don't edit any code directly into the addon folder because at every update you'll make, everything will be erased. The good wayIt's simple! You create a separate addon! Where to begin?Create a new addon folder. I'll call it in this example:
Inside of it, we will make 2 new files called:
skin.lua The TOC file need to match the name of your folder or it will fail to load. Skin.lua is just the file where you'll put all your codes. What I should write in the TOC file?Let's focus on the TOC now. Open it with your favorite text editor and use this code as a start.
Just a note, in the example there is "|cffC495DD" and "|r", this is just a HEX color to match Tukui in addon list.
Edit these lines to match your addon. You are now done with the toc file. Save and exit. And now, the skin.lua file?Here is the most difficult part. I'll try my best to explain how to do it. First of all, you'll mostly work with 2 commands.
Let's start with the Lua file now. To be able to skin addon to match Tukui, you need to include everytime at the top of a new file this part of code: local T, C, L = unpack(Tukui) This is telling your addon to import the Tukui functions, configurations and locales.
Click here to see the final code. Final noteI'm seeing more and more edits of Tukui every year. One thing I noticed, nobody use this trick to make their edit. I've seeing in the past, only 1 member doing it this way which I don't remember at all who did it. You can apply this guide to edit Tukui to your own liking by creating a separate addon (example: TukuiObamaEdit) and moving, resizing, skinning everything. Almost all frames I've created in Tukui have a global name. They are easy to find with framestack command. This way, you can update a lot more easily Tukui to latest version by keeping your change (with your edit addon) every time an update is available. That's it for tonight. I'm out. I hope you liked this little guide I wrote before going to sleep and sorry for my english. As most of you already know, my native language is french. Before I've created tukui.org website, I had 0 knowledge with english but i'm learning a lot with all of you in here since 2008. I'm now able to travel and speak english easily everywhere I go!
Last updated: 20-09-2011 |