Reply
 
Thread Tools Display Modes
Old 07-02-05, 06:18 PM   #1
Wing/
A Murloc Raider
Join Date: Jun 2005
Posts: 8
new to lua/xml

does any 1 know a good tut(or want to explain) to make a CheckButton hold a spell and use it when you click on it i tryed look at existing mods but i cant get it to work i did get the xml to make the button to show up but i dont know how to use it!
pls help
and tnx
Wing/ is offline   Reply With Quote
Old 07-04-05, 09:27 AM   #2
Wing/
A Murloc Raider
Join Date: Jun 2005
Posts: 8
well i didnt get any replis so well i tryed to get it to work but well i cant but i did put some stuff together if u got some time look on it pls do so and look if u can find out why it doesnt work!

tnx for u help!
Attached Files
File Type: zip BottomBar.zip (8.3 KB, 637 views)
Wing/ is offline   Reply With Quote
Old 07-04-05, 11:22 AM   #3
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
You have a lot of code there for trying an experiment. You might get a better response if you strip back the example to one really simple button.

I haven't done anything with button bars, but I see you're trying to use the standard action button framework. That probably won't work with check buttons because they don't derive from the ActionButton frame template.

Try writing your button to use a hard-coded CastSpellByName() instead of UseAction(). Once you get that working, then you can create an ActionCheckButton template and try to get it to behave enough like a normal ActionButton that the action button framework accepts it.

In my experience, it's best to learn by ripping out everything I don't understand, then add stuff back slowly as I learn. Many add-ons started out as a cut-and-paste from Blizz code and then accumulated extra features by experimenting with the API. (It's *amazing* how much stuff has been reverse engineered from Blizzard's undocumented code.) Starting from scratch is a slower path than the cut-paste-hack route, but you'll understand things a lot better in the end.
Littlejohn is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » Lua/XML Help » new to lua/xml

Thread Tools
Display Modes

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