Thread Tools Display Modes
07-08-10, 12:23 AM   #1
qwertyui
An Aku'mai Servant
Join Date: Feb 2006
Posts: 30
How to do reusable elements?

I find myself creating a lot of elements with similar functionality.

E.g. my health and power bars in all my frames are virtually identical, save for width / height parameters. Same for my castbars. My buff bars are absolutely identical so far.

So when i change something in one element, i want to see this change in all of similar elements.

For instance, i have the same texture on all my buff icons on all frames. I want to have one place where i can change it if i want to, without having to go into every single frame updating it.

Normally tasks such as these are accomplished by global static variables. Using global variables provides the ability to specify shared parameters across multiple separate entities of the same make, while still having the option of using a local variable for entities that need to have unique values for some parameters, or another global variable for a different class of entities. Now, all i saw in RDX so far are local variables. Is there a way to specify and access globals?

P.S: Also, while we are on the topic of variables accessing everywhere, what is "decor" owner, which always seems provided as an alternative to "base"?

Last edited by qwertyui : 07-08-10 at 12:32 AM.
  Reply With Quote
07-08-10, 01:15 AM   #2
sigg
Featured Artist
 
sigg's Avatar
Featured
Join Date: Aug 2008
Posts: 1,251
Hello

It is possible to create some global features.
You have to use the "feature proxy".

Open your unitframe editor, use the button to export one feature as an object on the repository.
Drop your feature on your unitframe.
Add a proxy feature and select your object from the repository.

You can edit your feature from the explorer.

Doing this make your unitframe more complexe.

About the decor frame.
All yours features should use the decor as the owner by default.
Only some specific features like the hotspot must use the base as the owner.

The base frame is sometime secured and you can't use Show/Hide on it whereas decor, you can. Some internal function cleanup whill hide the decor, it is usefull when you are working with backdrop.

Sigg
  Reply With Quote
07-09-10, 09:54 PM   #3
unlimit
Lookin' Good
 
unlimit's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 484
My DUI uses reusable elements extensively as a desktop feature, and should be a great learning tool if you wished to play around with them.

http://www.wowinterface.com/download...ssibleDUI.html
__________________


kúdan: im playing pantheon
JRCapablanca: no youre not
** Pantheon has been Banned. **
  Reply With Quote
07-10-10, 12:16 AM   #4
qwertyui
An Aku'mai Servant
Join Date: Feb 2006
Posts: 30
Just what i needed, thanks
  Reply With Quote

WoWInterface » Featured Projects » OpenRDX » OpenRDX Community » OpenRDX: Community Chat » How to do reusable elements?


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