WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   new to lua/xml (https://www.wowinterface.com/forums/showthread.php?t=1163)

Wing/ 07-02-05 06:18 PM

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/ 07-04-05 09:27 AM

1 Attachment(s)
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!

Littlejohn 07-04-05 11:22 AM

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.


All times are GMT -6. The time now is 02:13 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI