Thread: GUI's
View Single Post
05-31-05, 03:34 PM   #44
Beladona
A Molten Giant
 
Beladona's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 539
hmm, will play with it some more. Remapping an element reference would in fact be the ideal way to do a total conversion in my opinion...

Something else you might consider is NOT hiding MinimapCluster, but instead find a way to make it transparent. You might do this by setting the texture for it in your LUA to something that is blank, and then anchor it to your new minimap. Then addons can still anchor to it all they want, they will just be anchored to it, which is anchored to yours... if you get what I mean.

The final thing you could do, to at least get some mods to work right, is to do a detection script within your own addon. I did this for an addon I was testing, which is going to be part of a larger suite I plan to release very soon. Create a new function that does something like:

Code:
function MyMiniMapCluster_OnDetect()
	if (SomeGathererFunction) then 
		GathererIcon:ClearAllPoints();
		GathererIcon:SetPoint("TOP", "MyMiniMapCluster", "TOP", 0, 0);
	end
end
All it does is check to see if SomeGathererFunction exists (I recommend using a gatherer function like the main OnLoad function, as it will most likely be there in all versions he ever releases.) and if it does exist, it will move the icon to your new minimap cluster. Obviously what I used above are fake references, so make the changes as you see fit. Call that function in your onload function, and it SHOULD work perfectly. Like I said, I used this method to get custom mods to list themselves in a mod list interface I was creating. If the mod existed, it would get added using my custom function that adds them to the list. -- doing it this way means the user is free to update said mod anytime they want, and it STILL works with your mod, because you are not making any special code changes to someone else's AddOn to make it work with yours.

I don't believe in making slight changes in other AddOns to make them work with mine. I either rewrite their AddOn from the ground up to suit my needs, or I do something in my own AddOn to make theirs behave the way I need it to. Changing underlying code in an AddOn maintained by someone else breaks forwards compatibility when someone attempts to update that individual AddOn. This is one of the problems many users of "Recompilations" face when the original creator of a mod releases an update, and the recmp user attempts to update that part. They then lose whatever custom code the recmp creator added or changes, and thereby lose some functionality of that recmp, or worse causes errors...

Last edited by Beladona : 05-31-05 at 04:00 PM.
  Reply With Quote