![]() ![]() We added a new parameter to our frame, parent= "UIParent". Now we anchor the frame to the center of the screen The height of 20 pixel is the final height for the frame! The width doesn’t really matter in our case, because we will have to set it dynamically later on, but for now we set it to 120 so we will see something. (Means x=”0.5″ and y=”0.5″ would be exactly the half of the whole screen) Thats why it is called AbsDimension.Īnother possibility would have been the tag which, other than our tag takes the values relative to the screen, from 0 to 1. The width of our frame as x and the height as y. This information can be give with different tags.We use the tag which takes two parameters. The element contains the size information for the frame. There are three things we need to do before we can see our frame in the game: give it a size, anchor it to a point and create a backdrop. If you somewhen write your own AddOns it’d be nice for you and other people if you give your stuff reasonable names.Ī prefix like WoWProFit is not necessary, but again it increases the understandibility and prevents interferences with other AddOns. I called it "WoWProFit_MainFrame" because this name is really clear to everyone who reads it. We’ve already given our frame a specific name, with the name parameter. ![]() It just has to be there The element, how could it be different, represents the frame we are about to create. The element is the only really needed tag in the. Open the WoWProFit.xml file and write the following lines Just follow the guide and everything will explain itself. Tags can be closed in their opening tag, looks like this: (note the slash at the end)Īs you can see, it is possible (and often used) to add parameters in the tag.Įverything between the opening and ending of a tag will either influence it or will be influenced by it.ĭon’t worry if you have problems understanding this, it’s not very hard. Closing tags have a slash (/) in the front. Tags generally get opened and closed again. XML works with so called tags, you probably already met something similar here on WoWPro if you ever formatted some text. If you never programmed before this might need some explanation. But first of all, a short introduction about XML: Now we will create the background and borders for our AddOn. The last two lines are the filenames of the files we want to include to our AddOn. Note: is a description that will be shown under the title. Title: is the title of the AddOn that will appear in the AddOn list at the character select screen. If you want to know how to get the current number look hereĬurrent Interface number: 30300 (07 January 2010) Interface: tells World of Warcraft for which client version the AddOn was written. toc file format I recommend you visit the wowwiki page about it. If you really want to learn everything about the. Now open the WoWProFit.toc file and write the following lines:Įvery line with a # in the front represents a parameter. So, in your AddOns folder, create a new folder called “ WoWProFit” and create the following files: toc file has to have the same name as this folder. As said above, all our files have to be in their own folder and our. So never despair, keep cool and have fun!īefore we actually start coding we will prepare the file and order structure. Nevertheless you have to note, that this Guide won’t give you ALL information you need to write professional AddOns like Cartographer or TourGuide, but it is definitely a step in the right direction WoW-ProFit includes pretty much everything that is needed for this “ basic” introduction. Additionally it keeps track over all the session since it’s installation and can display the all-time profit/deficit. The little AddOn you will write during this guide will show you exactly how much money you have spent or earned in the current playing session. The star means that there are some visible changes, so it might be a good idea to look at your AddOn in the game. The blue segment contains the explanations for what has been done in the code. The purple segment is the place for lua code-snippets The grey segment is the place for XML code-snippets The green segment will have a short introduction on what will be done in this step The steps can consist out of three different “segments”: (That’s why the WoW-ProFit AddOn won’t be available as a download!)Īs you will see, the Guide is based on steps. No seriously, please don’t just read the guide an try to memorize something, this would have absouletely no use and it would completely spoil the fun you have while writing your first own AddOn. This guide has been written for learning-by-doing, so roll up your sleeves and prepare for hard work! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |