WoW Frames TutorialTo understand Frames, i've created a little Addon for myself, to learn how these things are working.Learning Lua was easy, but the XML Frames are a bit more of a challenge because there is no 100% documentation on it. So the easiest way to learn is to start an Addon to play around with it. To start the Tutorial we need the folder \Interface\Addons\FaraFrames\ , where we have 3 basic files: FaraFrames.toc
FaraFrames1.XML, here the basic setup:
just to have the OnLoad Procedure just once (this is a special setup for this test addon), it's not necessary for your own addons. The corresponding Function inside FaraFrames.lua:
We take a look at what else is needed inside FaraFrames.lua
Also we need a SlashCommandHandler function we already set it in the OnLoad function, here it is:
Now we can use this Addon in game, with /ff. While we can already Reload the UI (this means it will refresh all scripts) with /ff 0 We can't open any frame yet, because we haven't done one yet. Later on we can call our first frame with /ff 1 and so on.. Before we do that we need to complete our Lua file with the function FaraFrames_Toggle() which is used to show/hide the frames
We have our first working version of FaraFrames.lua togehter, you can see the complete source here Let's continue, we will now create our first Frame Proceed to Frame 1 |