Thread Tools Display Modes
08-10-06, 05:33 PM   #1
ALeX-L
A Defias Bandit
Join Date: Aug 2006
Posts: 3
AddOn optimization

Hi. i'm designing an addon that contains a lot of similar buttons. And it is inconvenient to write large code to each button. I have some questions:
- Is it possible to create button using lua script?
- Can I create my own function in xml?
TIA.

P.S. sorry for my english)
  Reply With Quote
08-13-06, 01:10 PM   #2
ALeX-L
A Defias Bandit
Join Date: Aug 2006
Posts: 3
One more question: can I clone existing UI object?
  Reply With Quote
08-14-06, 12:05 PM   #3
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
You can call Lua functions from a Button's handler as long as they are globally accessable. Then it is just a matter of being able to differentiate between buttons.

Originally Posted by ALeX-L
One more question: can I clone existing UI object?
You can't clone an existing object, but you can use XML templates to share property definitions between multiple objects.

Last edited by Esamynn : 08-15-06 at 11:13 AM. Reason: spelling correction
  Reply With Quote
08-15-06, 04:09 AM   #4
ALeX-L
A Defias Bandit
Join Date: Aug 2006
Posts: 3
Thanks. i'll try it.

Last edited by ALeX-L : 08-15-06 at 08:17 AM.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » AddOn optimization


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