Thread Tools Display Modes
11-17-08, 11:56 PM   #1
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
Coding question

I was wondering... can an entire Interface be created through the .lua code and the xml just points to the files to load through the lua without using ace just using your own code?
  Reply With Quote
11-18-08, 12:10 AM   #2
Syzgyn
An Aku'mai Servant
 
Syzgyn's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 37
You don't have to use Ace to write addons, or XML, for that matter.
  Reply With Quote
11-18-08, 12:19 AM   #3
Yhor
A Pyroguard Emberseer
 
Yhor's Avatar
Join Date: May 2007
Posts: 1,077
Rabbit is in my head, I've been consumed trying to 'get started' on something like this. My problem is I've only done tuts and such (fixes here and there), and I don't know where to put my efforts into getting it out of my head and into code.
  Reply With Quote
11-18-08, 12:54 AM   #4
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
I hear ya... lately I have been messing with xml ALOT... I use word pad to type the code and to check and make sure the code is correct i load it up in explorer to see if the code shows up... if it doesn't i go back and fix tpyos, mistakes bla bla bla till it does.

Now i can get the frames created and have the textures and everything in the right place... but how on earth do i load the textures into WoW? (I have used eepanels and kgpanels and what not but looking to do it through the code). When i edit the XML the way i want do i have to go into the lua to tell it to lead the xml? i assumed the xml laoded the lua... or is there something i am COMPLETELY letting go over my head... i have been diggin for days now and can't find what i am doing wrong :P.
  Reply With Quote
11-18-08, 01:21 AM   #5
Syzgyn
An Aku'mai Servant
 
Syzgyn's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 37
First off, I would really recommend using a different text editor for coding. I use Notepad++ and it's great, but anything is gonna be better than wordpad. Also, download Bugsack and Buggrabber from wowace, it'll give you some much better debugging info.

Take a look at http://www.wowwiki.com/Getting_start...writing_addons. It'll give you the basic idea of how addons load things.

To load a texture into WoW, it needs to be in your addons folder somewhere. Then it needs to be created within a frame as a texture object, and anchored somewhere on the UI.
  Reply With Quote
11-18-08, 01:34 AM   #6
Rabbit007
A Black Drake
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 81
Oh ok... so first i have to create the frame for the UI Textures to sit ontop of then create the other frames to sit ontop of that which hold the textures.
  Reply With Quote
11-18-08, 03:26 AM   #7
Psoewish
A Scalebane Royal Guard
 
Psoewish's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 447
Thanks for that website syzgyn, I've been looking to get started on addons as well, but had no clue where to start either, that seems like an awesome place to start
  Reply With Quote
11-18-08, 08:20 AM   #8
Akryn
A Firelord
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 479
Originally Posted by Psoewish View Post
Thanks for that website syzgyn, I've been looking to get started on addons as well, but had no clue where to start either, that seems like an awesome place to start
I love your avatar BTW. starfish > dangos
</ot>

Anyway...since the OP asked whether you need .xml -- and that tutorial basically says that you do -- you actually don't. You can just list the .lua file in your .toc directly without having to have a <script> tag in XML somewhere. Mostly, XML is used for laying-out UI objects/frames but you *can* do that in Lua...
see: http://www.wowwiki.com/World_of_Warc...ame_Management
although, I personally prefer to use XML, since it just seems like a clearer way to do layout, and separates it from the functional code stuff. There are a few things that you can do with Lua that you can't do with XML, but if you're just starting out I don't think it's important to worry about that.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Coding question


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off